<!DOCTYPE html>
<html lang="en">
  <!--浏览器搞笑标题-->
  <script type="text/javascript" src="/js/FunnyTitle.js"></script>
  <head hexo-theme='https://github.com/volantis-x/hexo-theme-volantis/tree/4.3.1'>
  <meta charset="utf-8">

<!-- 自定义右键 -->
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/zyoushuo/Blog@master/hexo/css/GalMenu.css">
  
  
  <!-- SEO相关 -->
  
    
  
  <!-- 渲染优化 -->
  <meta http-equiv='x-dns-prefetch-control' content='on' />
  <link rel='dns-prefetch' href='https://cdn.jsdelivr.net'>
  <link rel="preconnect" href="https://cdn.jsdelivr.net" crossorigin>
  <meta name="renderer" content="webkit">
  <meta name="force-rendering" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
  <meta name="HandheldFriendly" content="True" >
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  
  <link rel="preload" href="/xu-blog/css/first.css" as="style">
  

  <!-- 页面元数据 -->
  
  <title>Spring(二) IOC - Xu&#39;s Blog</title>
  
    <meta name="keywords" content="Spring">
  

  
    <meta name="description" content="IOC的简单介绍">
  

  <!-- feed -->
  
    <link rel="alternate" href="/xu-blog/atom.xml" title="Xu's Blog" type="application/atom+xml">
  

  <!-- import meta -->
  

  <!-- link -->
  
    <link rel="shortcut icon" type='image/x-icon' href="https://gitee.com/xxxxxwj/hexo-img/raw/master/hexo-img/20211017223207.png">
  

  <!-- import link -->
  

  
    
<link rel="stylesheet" href="/xu-blog/css/first.css">

  

  
  <link rel="stylesheet" href="/xu-blog/css/style.css" media="print" onload="this.media='all';this.onload=null">
  <noscript><link rel="stylesheet" href="/xu-blog/css/style.css"></noscript>
  

  <script id="loadcss"></script>

  
<script>
if (/*@cc_on!@*/false || (!!window.MSInputMethodContext && !!document.documentMode))
    document.write(
	'<style>'+
		'html{'+
			'overflow-x: hidden !important;'+
			'overflow-y: hidden !important;'+
		'}'+
		'.kill-ie{'+
			'text-align:center;'+
			'height: 100%;'+
			'margin-top: 15%;'+
			'margin-bottom: 5500%;'+
		'}'+
	'</style>'+
    '<div class="kill-ie">'+
        '<h1><b>抱歉，您的浏览器无法访问本站</b></h1>'+
        '<h3>微软已经于2016年终止了对 Internet Explorer (IE) 10 及更早版本的支持，<br/>'+
        '继续使用存在极大的安全隐患，请使用当代主流的浏览器进行访问。</h3><br/>'+
        '<a target="_blank" rel="noopener" href="https://www.microsoft.com/zh-cn/WindowsForBusiness/End-of-IE-support"><strong>了解详情 ></strong></a>'+
    '</div>');
</script>


<noscript>
	<style>
		html{
			overflow-x: hidden !important;
			overflow-y: hidden !important;
		}
		.kill-noscript{
			text-align:center;
			height: 100%;
			margin-top: 15%;
			margin-bottom: 5500%;
		}
	</style>
    <div class="kill-noscript">
        <h1><b>抱歉，您的浏览器无法访问本站</b></h1>
        <h3>本页面需要浏览器支持（启用）JavaScript</h3><br/>
        <a target="_blank" rel="noopener" href="https://www.baidu.com/s?wd=启用JavaScript"><strong>了解详情 ></strong></a>
    </div>
</noscript>

</head>

  <body>
    

<header id="l_header" class="l_header auto shadow show" style='opacity: 0' >
  <div class='container'>
  <div id='wrapper'>
    <div class='nav-sub'>
      <p class="title"></p>
      <ul class='switcher nav-list-h m-phone' id="pjax-header-nav-list">
        <li><a id="s-comment" class="fas fa-comments fa-fw" target="_self" href='javascript:void(0)'></a></li>
        
          <li><a id="s-toc" class="s-toc fas fa-list fa-fw" target="_self" href='javascript:void(0)'></a></li>
        
      </ul>
    </div>
		<div class="nav-main">
      
        
        <a class="title flat-box" target="_self" href='/xu-blog/'>
          
          
          
             Xu 
          
        </a>
      

			<div class='menu navigation'>
				<ul class='nav-list-h m-pc'>
          
          
          
            
            
              <li>
                <a class="menuitem flat-box faa-parent animated-hover" href=/xu-blog/
                  
                  
                  
                    id="xu-blog"
                  >
                  <i class='fas fa-rss fa-fw'></i>博客
                </a>
                
              </li>
            
          
          
            
            
              <li>
                <a class="menuitem flat-box faa-parent animated-hover" href=/xu-blog/categories/
                  
                  
                  
                    id="xu-blogcategories"
                  >
                  <i class='fas fa-folder-open fa-fw'></i>分类
                </a>
                
              </li>
            
          
          
            
            
              <li>
                <a class="menuitem flat-box faa-parent animated-hover" href=/xu-blog/tags/
                  
                  
                  
                    id="xu-blogtags"
                  >
                  <i class='fas fa-tags fa-fw'></i>标签
                </a>
                
              </li>
            
          
          
            
            
              <li>
                <a class="menuitem flat-box faa-parent animated-hover" href=/xu-blog/archives/
                  
                  
                  
                    id="xu-blogarchives"
                  >
                  <i class='fas fa-archive fa-fw'></i>归档
                </a>
                
              </li>
            
          
          
            
            
              <li>
                <a class="menuitem flat-box faa-parent animated-hover" href=/xu-blog/friends/
                  
                  
                  
                    id="xu-blogfriends"
                  >
                  <i class='fas fa-link fa-fw'></i>友链
                </a>
                
              </li>
            
          
          
            
            
              <li>
                <a class="menuitem flat-box faa-parent animated-hover" href=/xu-blog/about/
                  
                  
                  
                    id="xu-blogabout"
                  >
                  <i class='fas fa-user fa-fw'></i>关于
                </a>
                
              </li>
            
          
          
				</ul>
			</div>

      <div class="m_search">
        <form name="searchform" class="form u-search-form">
          <i class="icon fas fa-search fa-fw"></i>
          <input type="text" class="input u-search-input" placeholder="" />
        </form>
      </div>

			<ul class='switcher nav-list-h m-phone'>
				
					<li><a class="s-search fas fa-search fa-fw" target="_self" href='javascript:void(0)'></a></li>
				
				<li>
          <a class="s-menu fas fa-bars fa-fw" target="_self" href='javascript:void(0)'></a>
          <ul class="menu-phone list-v navigation white-box">
            
              
            
              <li>
                <a class="menuitem flat-box faa-parent animated-hover" href=/xu-blog/
                  
                  
                  
                    id="xu-blog"
                  >
                  <i class='fas fa-rss fa-fw'></i>博客
                </a>
                
              </li>
            
          
            
              
            
              <li>
                <a class="menuitem flat-box faa-parent animated-hover" href=/xu-blog/categories/
                  
                  
                  
                    id="xu-blogcategories"
                  >
                  <i class='fas fa-folder-open fa-fw'></i>分类
                </a>
                
              </li>
            
          
            
              
            
              <li>
                <a class="menuitem flat-box faa-parent animated-hover" href=/xu-blog/tags/
                  
                  
                  
                    id="xu-blogtags"
                  >
                  <i class='fas fa-tags fa-fw'></i>标签
                </a>
                
              </li>
            
          
            
              
            
              <li>
                <a class="menuitem flat-box faa-parent animated-hover" href=/xu-blog/archives/
                  
                  
                  
                    id="xu-blogarchives"
                  >
                  <i class='fas fa-archive fa-fw'></i>归档
                </a>
                
              </li>
            
          
            
              
            
              <li>
                <a class="menuitem flat-box faa-parent animated-hover" href=/xu-blog/friends/
                  
                  
                  
                    id="xu-blogfriends"
                  >
                  <i class='fas fa-link fa-fw'></i>友链
                </a>
                
              </li>
            
          
            
              
            
              <li>
                <a class="menuitem flat-box faa-parent animated-hover" href=/xu-blog/about/
                  
                  
                  
                    id="xu-blogabout"
                  >
                  <i class='fas fa-user fa-fw'></i>关于
                </a>
                
              </li>
            
          
            
          </ul>
        </li>
			</ul>
		</div>
	</div>
  </div>
</header>

    <div id="l_body">
      <div id="l_cover">
  
    
        <div id="full" class='cover-wrapper post search' style="display: none;">
          
            <div class='cover-bg lazyload placeholder' data-bg="https://cdn.jsdelivr.net/gh/volantis-x/cdn-wallpaper-minimalist/2020/004.jpg"></div>
          
          <div class='cover-body'>
  <div class='top'>
    
    
      <p class="title">Xu’s Blog</p>
    
    
  </div>
  <div class='bottom'>
    
      <div class="m_search">
        <form name="searchform" class="form u-search-form">
          <input type="text" class="input u-search-input" placeholder="Search..." />
          <i class="icon fas fa-search fa-fw"></i>
        </form>
      </div>
    
    <div class='menu navigation'>
      <div class='list-h'>
        
          
            <a href="/xu-blog/"
              
              
              id="xu-blog">
              <i class='fas fa-rss fa-fw'></i><p>博客</p>
            </a>
          
            <a href="/xu-blog/categories/"
              
              
              id="xu-blogcategories">
              <i class='fas fa-folder-open fa-fw'></i><p>分类</p>
            </a>
          
            <a href="/xu-blog/tags/"
              
              
              id="xu-blogtags">
              <i class='fas fa-tags fa-fw'></i><p>标签</p>
            </a>
          
            <a href="/xu-blog/archives/"
              
              
              id="xu-blogarchives">
              <i class='fas fa-archive fa-fw'></i><p>归档</p>
            </a>
          
            <a href="/xu-blog/friends/"
              
              
              id="xu-blogfriends">
              <i class='fas fa-link fa-fw'></i><p>友链</p>
            </a>
          
            <a target="_blank" rel="noopener" href="https://github.com/xucoud"
              
              
              id="https:githubcomxucoud">
              <i class='fab fa-github fa-fw'></i><p>Git</p>
            </a>
          
            <a href="/xu-blog/about/"
              
              
              id="xu-blogabout">
              <i class='fas fa-user fa-fw'></i><p>关于</p>
            </a>
          
        
      </div>
    </div>
  </div>
</div>

          <div id="scroll-down" style="display: none;"><i class="fa fa-chevron-down scroll-down-effects"></i></div>
        </div>
    
  
  </div>

      <div id="safearea">
        <div class="body-wrapper" id="pjax-container">
          

<div class='l_main'>
  <article class="article post white-box reveal md shadow article-type-post" id="post" itemscope itemprop="blogPost">
  


  
  <div class="article-meta" id="top">
    
    
    
      <h1 class="title">
        Spring(二) IOC
      </h1>
      <div class='new-meta-box'>
        
          
            
<div class='new-meta-item author'>
  <a class='author' href="/about" rel="nofollow">
    <img no-lazy src="/img/avater.jpg">
    <p>xwj</p>
  </a>
</div>

          
        
          
            
  <div class='new-meta-item category'>
    <a class='notlink'>
      <i class="fas fa-folder-open fa-fw" aria-hidden="true"></i>
      <a class="category-link" href="/xu-blog/categories/Spring/">Spring</a>
    </a>
  </div>


          
        
          
            <div class="new-meta-item date">
  <a class='notlink'>
    <i class="fas fa-calendar-alt fa-fw" aria-hidden="true"></i>
    <p>发布于：May 19, 2021</p>
  </a>
</div>

          
        
          
            
  <div class="new-meta-item browse leancloud">
    <a class='notlink'>
      
      <div id="lc-pv" data-title="Spring(二) IOC" data-path="/xu-blog/2021/05/19/Spring-%E4%BA%8C-IOC%E4%BB%8B%E7%BB%8D/">
        <i class="fas fa-eye fa-fw" aria-hidden="true"></i>
        <span id='number'><i class="fas fa-circle-notch fa-spin fa-fw" aria-hidden="true"></i></span>
        次浏览
      </div>
    </a>
  </div>


          
        
      </div>
    
  </div>


  
  
  <p>IOC的简单介绍</p>
<span id="more"></span>

<h2 id="介绍"><a href="#介绍" class="headerlink" title="介绍"></a>介绍</h2><p><code>IOC</code>（Inversion of control） 控制反转 是一种设计思想，<code>DI</code>（依赖注入）是实现<code>IOC</code>的一种方式，也有人认为<code>DI</code> 是<code>IOC</code>的另一种说法。在没有IOC的程序中，我们使用面对对象编程，对象的创建完全由程序自己控制（掌握在程序员的手中），而使用<code>IOC</code> 控制反转后，对象的创建就交到了用户的手上。</p>
<p>控制反转就是：获得依赖对象的方式反转了。</p>
<h2 id="IOC实现"><a href="#IOC实现" class="headerlink" title="IOC实现"></a>IOC实现</h2><p>采用<code>XML</code> 的方式配置<code>Bean</code>的时候，<code>Bean</code> 的定义与实现是分离的</p>
<p>采用注解的方式可以将二者合为一体，<code>Bean</code> 的信息直接以注解的方式定义在实现类中，达到零配置的目的</p>
<p>控制反转是以一种通过描述（XML 和 注解）并通过第三方去生产或获取特定对象的方式，在Spring中实现控制反转的是IOC容器，其实现方法就是依赖注入（DI）。</p>
<p>在没有使用IOC思想时，我们改动实现不同的操作，需要到程序中进行修改，使用了IOC思想后，只需在XML文件中进行修改即可</p>
<h2 id="使用无参构造函数，默认创建对象。"><a href="#使用无参构造函数，默认创建对象。" class="headerlink" title="使用无参构造函数，默认创建对象。"></a>使用无参构造函数，默认创建对象。</h2><p>实体类：</p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">public</span> <span class="class"><span class="keyword">class</span> <span class="title">Hello</span> </span>&#123;</span><br><span class="line">    <span class="keyword">private</span> String name;</span><br><span class="line"></span><br><span class="line">    <span class="function"><span class="keyword">public</span> String <span class="title">getName</span><span class="params">()</span> </span>&#123;</span><br><span class="line">        <span class="keyword">return</span> name;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title">setName</span><span class="params">(String name)</span> </span>&#123;</span><br><span class="line">        <span class="keyword">this</span>.name = name;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="meta">@Override</span></span><br><span class="line">    <span class="function"><span class="keyword">public</span> String <span class="title">toString</span><span class="params">()</span> </span>&#123;</span><br><span class="line">        <span class="keyword">return</span> <span class="string">&quot;Hello&#123;&quot;</span> +</span><br><span class="line">                <span class="string">&quot;name=&#x27;&quot;</span> + name + <span class="string">&#x27;\&#x27;&#x27;</span> +</span><br><span class="line">                <span class="string">&#x27;&#125;&#x27;</span>;</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<p>配置类：</p>
<figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">beans</span> <span class="attr">xmlns</span>=<span class="string">&quot;http://www.springframework.org/schema/beans&quot;</span></span></span><br><span class="line"><span class="tag">       <span class="attr">xmlns:xsi</span>=<span class="string">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span></span></span><br><span class="line"><span class="tag">       <span class="attr">xsi:schemaLocation</span>=<span class="string">&quot;http://www.springframework.org/schema/beans</span></span></span><br><span class="line"><span class="string"><span class="tag">       https://www.springframework.org/schema/beans/spring-beans.xsd&quot;</span>&gt;</span></span><br><span class="line"></span><br><span class="line">    <span class="tag">&lt;<span class="name">bean</span> <span class="attr">id</span>=<span class="string">&quot;hello&quot;</span> <span class="attr">class</span>=<span class="string">&quot;com.xwj.pojo.Hello&quot;</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">property</span> <span class="attr">name</span>=<span class="string">&quot;name&quot;</span> <span class="attr">value</span>=<span class="string">&quot;Spring&quot;</span>/&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">bean</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;/<span class="name">beans</span>&gt;</span></span><br></pre></td></tr></table></figure>

<p>项目启动类：</p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">public</span> <span class="class"><span class="keyword">class</span> <span class="title">MyText</span> </span>&#123;</span><br><span class="line"></span><br><span class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">main</span><span class="params">(String[] args)</span> </span>&#123;</span><br><span class="line">        <span class="comment">//获取Spring的上下文配置,</span></span><br><span class="line">        ApplicationContext applicationContext = <span class="keyword">new</span>                        							ClassPathXmlApplicationContext(<span class="string">&quot;beans.xml&quot;</span>);</span><br><span class="line"></span><br><span class="line">        <span class="comment">//对象都在spring中管理了，我们要使用，直接从中拿就行</span></span><br><span class="line">        Hello hello = (Hello) applicationContext.getBean(<span class="string">&quot;hello&quot;</span>);</span><br><span class="line">        System.out.println(hello.toString());;</span><br><span class="line"></span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<h2 id="使用有参构造函数创造对象"><a href="#使用有参构造函数创造对象" class="headerlink" title="使用有参构造函数创造对象"></a>使用有参构造函数创造对象</h2><pre><code>## 通过下标赋值
</code></pre>
<p>实体类：</p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">public</span> <span class="class"><span class="keyword">class</span> <span class="title">Hello</span> </span>&#123;</span><br><span class="line">    <span class="keyword">private</span> String name;</span><br><span class="line"></span><br><span class="line">    <span class="comment">//创建有参构造函数</span></span><br><span class="line">    <span class="function"><span class="keyword">public</span> <span class="title">Hello</span><span class="params">(String str)</span> </span>&#123;</span><br><span class="line">        <span class="keyword">this</span>.name = str;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="function"><span class="keyword">public</span> String <span class="title">getName</span><span class="params">()</span> </span>&#123;</span><br><span class="line">        <span class="keyword">return</span> name;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title">setName</span><span class="params">(String name)</span> </span>&#123;</span><br><span class="line">        <span class="keyword">this</span>.name = name;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="meta">@Override</span></span><br><span class="line">    <span class="function"><span class="keyword">public</span> String <span class="title">toString</span><span class="params">()</span> </span>&#123;</span><br><span class="line">        <span class="keyword">return</span> <span class="string">&quot;Hello&#123;&quot;</span> +</span><br><span class="line">                <span class="string">&quot;name=&#x27;&quot;</span> + name + <span class="string">&#x27;\&#x27;&#x27;</span> +</span><br><span class="line">                <span class="string">&#x27;&#125;&#x27;</span>;</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<p>配置类：</p>
<figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">beans</span> <span class="attr">xmlns</span>=<span class="string">&quot;http://www.springframework.org/schema/beans&quot;</span></span></span><br><span class="line"><span class="tag">       <span class="attr">xmlns:xsi</span>=<span class="string">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span></span></span><br><span class="line"><span class="tag">       <span class="attr">xsi:schemaLocation</span>=<span class="string">&quot;http://www.springframework.org/schema/beans</span></span></span><br><span class="line"><span class="string"><span class="tag">       https://www.springframework.org/schema/beans/spring-beans.xsd&quot;</span>&gt;</span></span><br><span class="line"></span><br><span class="line">    <span class="tag">&lt;<span class="name">bean</span> <span class="attr">id</span>=<span class="string">&quot;hello&quot;</span> <span class="attr">class</span>=<span class="string">&quot;com.xwj.pojo.Hello&quot;</span>&gt;</span></span><br><span class="line"><span class="comment">&lt;!--    通过下标的方式，来注入值    --&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">constructor-arg</span> <span class="attr">index</span>=<span class="string">&quot;0&quot;</span> <span class="attr">value</span>=<span class="string">&quot;xwj&quot;</span>/&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">bean</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;/<span class="name">beans</span>&gt;</span></span><br></pre></td></tr></table></figure>

<h3 id="通过类型赋值"><a href="#通过类型赋值" class="headerlink" title="通过类型赋值"></a>通过类型赋值</h3><p>配置类：</p>
<figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">&lt;!-- 通过类型赋值 不建议使用 --&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">bean</span> <span class="attr">id</span>=<span class="string">&quot;hello&quot;</span> <span class="attr">class</span>=<span class="string">&quot;com.xwj.pojo.Hello&quot;</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">constructor-arg</span> <span class="attr">type</span>=<span class="string">&quot;java.lang.String&quot;</span> <span class="attr">value</span>=<span class="string">&quot;xwj&quot;</span>/&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">bean</span>&gt;</span></span><br></pre></td></tr></table></figure>

<h3 id="通过参数名，直接赋值"><a href="#通过参数名，直接赋值" class="headerlink" title="通过参数名，直接赋值"></a>通过参数名，直接赋值</h3><p>配置类：</p>
<figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">&lt;!-- 直接通过参数名，进行赋值 --&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">bean</span> <span class="attr">id</span>=<span class="string">&quot;hello&quot;</span> <span class="attr">class</span>=<span class="string">&quot;com.xwj.pojo.Hello&quot;</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">constructor-arg</span> <span class="attr">name</span>=<span class="string">&quot;str&quot;</span> <span class="attr">value</span>=<span class="string">&quot;xwj&quot;</span>/&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">bean</span>&gt;</span></span><br></pre></td></tr></table></figure>

<h2 id="总结"><a href="#总结" class="headerlink" title="总结"></a>总结</h2><p>所谓的IOC思想，是由Spring来创建，管理，装配对象。</p>
<p>Spring容器就像一个大仓库，在配置文件加载的时候，容器中的管理的对象就已经初始话完成，需要哪一个对象，就直接从中提取就行。不同对象，提取的是同一实体类对象，对象中的内容都是相同的。</p>
<p><img src="https://gitee.com/xxxxxwj/hexo-img/raw/master/hexo-img/20210526132213.png" class="lazyload" data-srcset="https://gitee.com/xxxxxwj/hexo-img/raw/master/hexo-img/20210526132213.png" srcset=""></p>

  
  
    
    <div class='footer'>
      
      
      
        <div class='copyright'>
          <blockquote>
            
              
                <p>本文作者👨‍💻：Xwj</p>

              
            
              
                <p>版权声明📃：博客内容遵循 署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0) 协议</p>

              
            
              
                <p>本文链接🔗：<a href=http://xxxxxwj.gitee.io/xu-blog/2021/05/19/Spring-%E4%BA%8C-IOC%E4%BB%8B%E7%BB%8D/>http://xxxxxwj.gitee.io/xu-blog/2021/05/19/Spring-%E4%BA%8C-IOC%E4%BB%8B%E7%BB%8D/</a></p>
              
            
          </blockquote>
        </div>
      
      
    </div>
  
  
    


  <div class='article-meta' id="bottom">
    <div class='new-meta-box'>
      
        
          <div class="new-meta-item date" itemprop="dateUpdated" datetime="2021-06-06T19:37:25+08:00">
  <a class='notlink'>
    <i class="fas fa-edit fa-fw" aria-hidden="true"></i>
    <p>更新于：Jun 6, 2021</p>
  </a>
</div>

        
      
        
          
  
  <div class="new-meta-item meta-tags"><a class="tag" href="/xu-blog/tags/Spring/" rel="nofollow"><i class="fas fa-hashtag fa-fw" aria-hidden="true"></i><p>Spring</p></a></div>


        
      
        
      
    </div>
  </div>


  
  

  
    <div class="prev-next">
      
        <a class='prev' href='/xu-blog/2021/05/21/Spring-%E4%B8%89-AOP/'>
          <p class='title'><i class="fas fa-chevron-left" aria-hidden="true"></i>Spring(三) AOP</p>
          <p class='content'>AOP 的简单介绍


介绍AOP（Aspect Oriented Programming）：面向切面编程，通过预编译方式和运行期间动态代理实现程序功能的统一维护的一种技术。AOP是OOP的延续...</p>
        </a>
      
      
        <a class='next' href='/xu-blog/2021/05/19/Spring-%E4%B8%80-%E7%AE%80%E4%BB%8B/'>
          <p class='title'>Spring(一) 简介<i class="fas fa-chevron-right" aria-hidden="true"></i></p>
          <p class='content'>Spring 的简单介绍

介绍Spring框架是一个开放源代码的J2EE应用程序框架，由[Rod Johnson](https://baike.baidu.com/item/Rod Johns...</p>
        </a>
      
    </div>
  
</article>


  

  <article class="post white-box reveal shadow" id="comments">
    <p ct><i class='fas fa-comments'></i> 评论</p>
    
    <!-- <div id="valine_container" class="valine_thread">
  <i class="fas fa-cog fa-spin fa-fw fa-2x"></i>
</div> -->


     <div id="valine_container" class="valine_thread">
       <i class="fas fa-cog fa-spin fa-fw fa-2x"></i>
     </div>
	 <!-- valine 添加一言 -->
	<script src="https://sdk.jinrishici.com/v2/browser/jinrishici.js" charset="utf-8"></script>
       <script type="text/javascript">
              jinrishici.load(function(result) {
            var jrsc_plac =  result.data.content + "\n「" + result.data.origin.title + "」" + result.data.origin.dynasty + " · " + result.data.origin.author
             document.getElementById("veditor").setAttribute("placeholder",jrsc_plac);
            });
     </script>



  </article>






</div>
<aside class='l_side'>
  
  
    
    



  <section class="widget toc-wrapper shadow desktop mobile" id="toc-div" >
    
  <header>
    
      <i class="fas fa-list fa-fw" aria-hidden="true"></i><span class='name'>本文目录</span>
    
  </header>


    <div class='content'>
        <ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E4%BB%8B%E7%BB%8D"><span class="toc-text">介绍</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#IOC%E5%AE%9E%E7%8E%B0"><span class="toc-text">IOC实现</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E4%BD%BF%E7%94%A8%E6%97%A0%E5%8F%82%E6%9E%84%E9%80%A0%E5%87%BD%E6%95%B0%EF%BC%8C%E9%BB%98%E8%AE%A4%E5%88%9B%E5%BB%BA%E5%AF%B9%E8%B1%A1%E3%80%82"><span class="toc-text">使用无参构造函数，默认创建对象。</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E4%BD%BF%E7%94%A8%E6%9C%89%E5%8F%82%E6%9E%84%E9%80%A0%E5%87%BD%E6%95%B0%E5%88%9B%E9%80%A0%E5%AF%B9%E8%B1%A1"><span class="toc-text">使用有参构造函数创造对象</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E9%80%9A%E8%BF%87%E7%B1%BB%E5%9E%8B%E8%B5%8B%E5%80%BC"><span class="toc-text">通过类型赋值</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E9%80%9A%E8%BF%87%E5%8F%82%E6%95%B0%E5%90%8D%EF%BC%8C%E7%9B%B4%E6%8E%A5%E8%B5%8B%E5%80%BC"><span class="toc-text">通过参数名，直接赋值</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%80%BB%E7%BB%93"><span class="toc-text">总结</span></a></li></ol>
    </div>
  </section>


  

  
    
    
  

  <section class="widget category shadow desktop">
    
  <header>
    
      <a href='/blog/categories/'><i class="fas fa-folder-open fa-fw" aria-hidden="true"></i><span class='name'>文章分类</span></a>
    
  </header>


    <div class='content'>
      <ul class="entry navigation">
        
          <li><a class="flat-box"
            title="/xu-blog/categories/Java/" href="/xu-blog/categories/Java/"
            id="xu-blogcategoriesJava"
            ><div class='name'>Java</div><div class='badge'>(1)</div></a></li>
        
          <li><a class="flat-box"
            title="/xu-blog/categories/Restful/" href="/xu-blog/categories/Restful/"
            id="xu-blogcategoriesRestful"
            ><div class='name'>Restful</div><div class='badge'>(1)</div></a></li>
        
          <li><a class="flat-box"
            title="/xu-blog/categories/Spring/" href="/xu-blog/categories/Spring/"
            id="xu-blogcategoriesSpring"
            ><div class='name'>Spring</div><div class='badge'>(11)</div></a></li>
        
          <li><a class="flat-box"
            title="/xu-blog/categories/SpringBoot/" href="/xu-blog/categories/SpringBoot/"
            id="xu-blogcategoriesSpringBoot"
            ><div class='name'>SpringBoot</div><div class='badge'>(1)</div></a></li>
        
          <li><a class="flat-box"
            title="/xu-blog/categories/go-web/" href="/xu-blog/categories/go-web/"
            id="xu-blogcategoriesgo-web"
            ><div class='name'>go web</div><div class='badge'>(1)</div></a></li>
        
          <li><a class="flat-box"
            title="/xu-blog/categories/k8s/" href="/xu-blog/categories/k8s/"
            id="xu-blogcategoriesk8s"
            ><div class='name'>k8s</div><div class='badge'>(1)</div></a></li>
        
      </ul>
    </div>
  </section>


  

  
    
    
  

  <section class="widget tagcloud shadow desktop mobile">
    
  <header>
    
      <a href='/blog/tags/'><i class="fas fa-tags fa-fw" aria-hidden="true"></i><span class='name'>热门标签</span></a>
    
  </header>


    <div class='content'>
      <a href="/xu-blog/tags/K8s/" style="font-size: 14px; color: #999">K8s</a> <a href="/xu-blog/tags/Restful/" style="font-size: 14px; color: #999">Restful</a> <a href="/xu-blog/tags/Spring/" style="font-size: 24px; color: #555">Spring</a> <a href="/xu-blog/tags/SpringBoot/" style="font-size: 14px; color: #999">SpringBoot</a> <a href="/xu-blog/tags/Thread/" style="font-size: 14px; color: #999">Thread</a> <a href="/xu-blog/tags/go/" style="font-size: 14px; color: #999">go</a>
    </div>
  </section>


  

  
    
    

<section class="widget shadow desktop">
  
  <header>
    
      <i class="fas fa-award fa-fw" aria-hidden="true"></i><span class='name'>站点信息</span>
    
  </header>


  <div class='content'>
    <div class="webinfo">
      
        <div class="webinfo-item">
          <div>文章数目：</div>
          <div>16 篇</div>
        </div>
      

      
        <div class="webinfo-item">
          <div>已运行时间：</div>
          <div id="webinfo-runtime-count" publish_date="03/24/2020 21:34:09"></div>
        </div>
        <script>
          var BirthDay = new Date(new Date('2021/05/17'));
          var today = new Date();
          var timeold = (today.getTime() - BirthDay.getTime());
          var daysold = Math.floor(timeold / (24 * 60 * 60 * 1000));
          document.getElementById('webinfo-runtime-count').innerHTML = daysold + ' 天';
        </script>
      


      

      
        <div class="webinfo-item">
          <div>本站访客数：</div>
          
          <div><span id="lc-uv"><span id='number'><i class="fas fa-circle-notch fa-spin fa-fw" aria-hidden="true"></i></span></span> 人</div>
          
        </div>
      

      
        <div class="webinfo-item">
          <div>本站总访问量：</div>
          
          <div><span id="lc-sv"><span id='number'><i class="fas fa-circle-notch fa-spin fa-fw" aria-hidden="true"></i></span></span> 次</div>
          
        </div>
      

      
        <div class="webinfo-item">
          <div>最后活动时间：</div>
          
            <div id="last-update" style="display: none;">Wed Oct 20 2021 15:34:27 GMT+0800 (中国标准时间)</div>
            <div id="last-update-show">2021-10-20 日</div>
          
        </div>
        
        <script>
          function timeago(dateTimeStamp) {
              var minute = 1000 * 60; //把分，时，天，周，半个月，一个月用毫秒表示
              var hour = minute * 60;
              var day = hour * 24;
              var week = day * 7;
              var month = day * 30;
              var now = new Date().getTime(); //获取当前时间毫秒
              var diffValue = now - dateTimeStamp; //时间差
              if (diffValue < 0) {
                  return;
              }
              var minC = diffValue / minute; //计算时间差的分，时，天，周，月
              var hourC = diffValue / hour;
              var dayC = diffValue / day;
              var weekC = diffValue / week;
              var monthC = diffValue / month;
              if (monthC >= 1 && monthC <= 3) {
                  result = " " + parseInt(monthC) + " 月前"
              } else if (weekC >= 1 && weekC <= 3) {
                  result = " " + parseInt(weekC) + " 周前"
              } else if (dayC >= 1 && dayC <= 6) {
                  result = " " + parseInt(dayC) + " 天前"
              } else if (hourC >= 1 && hourC <= 23) {
                  result = " " + parseInt(hourC) + " 小时前"
              } else if (minC >= 1 && minC <= 59) {
                  result = " " + parseInt(minC) + " 分钟前"
              } else if (diffValue >= 0 && diffValue <= minute) {
                  result = "刚刚"
              } else {
                  var datetime = new Date();
                  datetime.setTime(dateTimeStamp);
                  var Nyear = datetime.getFullYear();
                  var Nmonth = datetime.getMonth() + 1 < 10 ? "0" + (datetime.getMonth() + 1) : datetime.getMonth() + 1;
                  var Ndate = datetime.getDate() < 10 ? "0" + datetime.getDate() : datetime.getDate();
                  var Nhour = datetime.getHours() < 10 ? "0" + datetime.getHours() : datetime.getHours();
                  var Nminute = datetime.getMinutes() < 10 ? "0" + datetime.getMinutes() : datetime.getMinutes();
                  var Nsecond = datetime.getSeconds() < 10 ? "0" + datetime.getSeconds() : datetime.getSeconds();
                  result = Nyear + "-" + Nmonth + "-" + Ndate
              }
              return result;
          }
          var lastUpDate = document.getElementById('last-update').innerHTML;
          try {
            document.getElementById('last-update-show').innerHTML = timeago(new Date(lastUpDate));
          } catch (error) {
            document.getElementById('last-update-show').innerHTML = '2021-10-20 日';
          }
        </script>
        
      
    </div>
  </div>
</section>

  


</aside>



		  
		  <!--此文件用来存放一些不方便取值的变量-->
<!--思路大概是将值藏到重加载的区域内-->

<script>
  window.pdata={}
  pdata.ispage=true;
  pdata.postTitle="Spring(二) IOC";
  pdata.commentPath="";
  pdata.commentPlaceholder="";
  // header 这里无论是否开启pjax都需要
  var l_header=document.getElementById("l_header");
  
  l_header.classList.add("show");
  
  
    // cover
    var cover_wrapper=document.querySelector('.cover-wrapper');
    
    cover_wrapper.id="none";
    cover_wrapper.style.display="none";
    
  
</script>

        </div>
        
  
  <footer class="footer clearfix">
    <br><br>
    
      
        <div class="aplayer-container">
          

  
    <meting-js
      theme='#1BCDFC'
      autoplay='false'
      volume='0.7'
      loop='all'
      order='list'
      fixed='false'
      list-max-height='320px'
      server='tencent'
      type='playlist'
      id='8001964689'
      list-folded='true'>
    </meting-js>
  


        </div>
      
    
      
        <br>
        <div class="social-wrapper">
          
            
          
            
          
            
          
        </div>
      
    
      
        
          <div><p><span>📚 本文由<a target="_blank" rel="noopener" href="https://blogxwj.top/">Xu</a>创作，转载请注明出处</span> <br> <span>🧾 博客内容遵循 署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0) 协议</span> <br> <span id="lc-sv">本站总访问量为 <span id='number'><i class="fas fa-circle-notch fa-spin fa-fw" aria-hidden="true"></i></span> 次</span> <span id="lc-uv">访客数为 <span id='number'><i class="fas fa-circle-notch fa-spin fa-fw" aria-hidden="true"></i></span> 人</span></p>
</div>
        
      
    
      
        本站使用
        <a href="https://github.com/volantis-x/hexo-theme-volantis/tree/4.3.1" target="_blank" class="codename">Volantis</a>
        主题
      
    
      
        <div class='copyright'>
        <p><a href="/">Copyright © 2020 🧑‍💻 Xu</a> <br> <a target="_blank" rel="noopener" href="http://beian.miit.gov.cn">鄂ICP备2021009263号-1</a></p>

        </div>
      
    
  </footer>


        <a id="s-top" class="fas fa-arrow-up fa-fw" href="javascript:void(0)"></a>
      </div>
    </div>
    <div>
      <script>
/************这个文件存放不需要重载的全局变量和全局函数*********/
window.volantis={};
window.volantis.loadcss=document.getElementById("loadcss");
/******************** Pjax ********************************/
function VPjax(){
	this.list=[] // 存放回调函数
	this.start=()=>{
	  for(var i=0;i<this.list.length;i++){
		this.list[i].run();
	  }
	}
	this.push=(fn,name)=>{
		var f=new PjaxItem(fn,name);
		this.list.push(f);
	}
	// 构造一个可以run的对象
	function PjaxItem(fn,name){
		// 函数名称
		this.name = name || fn.name
		// run方法
		this.run=()=>{
			fn()
		}
	}
}
volantis.pjax={}
volantis.pjax.method={
	complete: new VPjax(),
	error: new VPjax(),
	send: new VPjax()
}
volantis.pjax={
	...volantis.pjax,
	push: volantis.pjax.method.complete.push,
	error: volantis.pjax.method.error.push,
	send: volantis.pjax.method.send.push
}
/********************脚本懒加载函数********************************/
// 已经加入了setTimeout
function loadScript(src, cb) {
	setTimeout(function() {
		var HEAD = document.getElementsByTagName('head')[0] || document.documentElement;
		var script = document.createElement('script');
		script.setAttribute('type','text/javascript');
		if (cb) script.onload = cb;
		script.setAttribute('src', src);
		HEAD.appendChild(script);
	});
}
//https://github.com/filamentgroup/loadCSS
var loadCSS = function( href, before, media, attributes ){
	var doc = window.document;
	var ss = doc.createElement( "link" );
	var ref;
	if( before ){
		ref = before;
	}
	else {
		var refs = ( doc.body || doc.getElementsByTagName( "head" )[ 0 ] ).childNodes;
		ref = refs[ refs.length - 1];
	}
	var sheets = doc.styleSheets;
	if( attributes ){
		for( var attributeName in attributes ){
			if( attributes.hasOwnProperty( attributeName ) ){
				ss.setAttribute( attributeName, attributes[attributeName] );
			}
		}
	}
	ss.rel = "stylesheet";
	ss.href = href;
	ss.media = "only x";
	function ready( cb ){
		if( doc.body ){
			return cb();
		}
		setTimeout(function(){
			ready( cb );
		});
	}
	ready( function(){
		ref.parentNode.insertBefore( ss, ( before ? ref : ref.nextSibling ) );
	});
	var onloadcssdefined = function( cb ){
		var resolvedHref = ss.href;
		var i = sheets.length;
		while( i-- ){
			if( sheets[ i ].href === resolvedHref ){
				return cb();
			}
		}
		setTimeout(function() {
			onloadcssdefined( cb );
		});
	};
	function loadCB(){
		if( ss.addEventListener ){
			ss.removeEventListener( "load", loadCB );
		}
		ss.media = media || "all";
	}
	if( ss.addEventListener ){
		ss.addEventListener( "load", loadCB);
	}
	ss.onloadcssdefined = onloadcssdefined;
	onloadcssdefined( loadCB );
	return ss;
};
</script>
<script>
  
  loadCSS("https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.14/css/all.min.css", window.volantis.loadcss);
  
  
  
  
</script>
<!-- required -->

<script src="https://cdn.jsdelivr.net/npm/jquery@3.5/dist/jquery.min.js"></script>

<script>
  function pjax_fancybox() {
    $(".md .gallery").find("img").each(function () { //渲染 fancybox
      var element = document.createElement("a"); // a 标签
      $(element).attr("class", "fancybox");
      $(element).attr("pjax-fancybox", "");  // 过滤 pjax
      $(element).attr("href", $(this).attr("src"));
      if ($(this).attr("data-original")) {
        $(element).attr("href", $(this).attr("data-original"));
      }
      $(element).attr("data-fancybox", "images");
      var caption = "";   // 描述信息
      if ($(this).attr('alt')) {  // 判断当前页面是否存在描述信息
        $(element).attr('data-caption', $(this).attr('alt'));
        caption = $(this).attr('alt');
      }
      var div = document.createElement("div");
      $(div).addClass("fancybox");
      $(this).wrap(div); // 最外层套 div ，其实主要作用还是 class 样式
      var span = document.createElement("span");
      $(span).addClass("image-caption");
      $(span).text(caption); // 加描述
      $(this).after(span);  // 再套一层描述
      $(this).wrap(element);  // 最后套 a 标签
    })
    $(".md .gallery").find("img").fancybox({
      selector: '[data-fancybox="images"]',
      hash: false,
      loop: false,
      closeClick: true,
      helpers: {
        overlay: {closeClick: true}
      },
      buttons: [
        "zoom",
        "close"
      ]
    });
  };
  function SCload_fancybox() {
    if ($(".md .gallery").find("img").length == 0) return;
    loadCSS("https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css", document.getElementById("loadcss"));
    loadScript('https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js', pjax_fancybox)
  };
  $(function () {
    SCload_fancybox();
  });
  function Pjax_SCload_fancybox(){
	if (typeof $.fancybox == "undefined") {
	 SCload_fancybox();
    } else {
	 pjax_fancybox();
    }
  }
  volantis.pjax.push(Pjax_SCload_fancybox)
  volantis.pjax.send(()=>{
      if (typeof $.fancybox != "undefined") {
        $.fancybox.close();    // 关闭弹窗
      }
  },'fancybox')
</script>


<!-- internal -->



  
  

  <div id="rightmenu-wrapper">
    <ul class="list-v rightmenu" id="rightmenu-content">
      <li class='option'>
        <a class='vlts-menu opt fix-cursor-default' id='menu-copy-text' onclick="document.execCommand('copy')"><i class='fa fa-copy fa-fw'></i>Copy Text</a>
        <hr id='hr-text'>
        <a class='vlts-menu opt fix-cursor-default' id='menu-copy-href'><i class='fa fa-link fa-fw'></i>Copy Link</a>
        <a class='vlts-menu opt fix-cursor-default' id='menu-open-href'><i class='fa fa-external-link-square-alt fa-fw'></i>Open Link in New Tab</a>
        <hr id='hr-href'>
        <a class='vlts-menu opt fix-cursor-default' id='menu-copy-src'><i class='fa fa-image fa-fw'></i>Copy Image Link</a>
        <hr id='hr-src'>
      </li>
      
        <li class='navigation'>
          <a class='nav icon-only fix-cursor-default' onclick='history.back()'><i class='fa fa-arrow-left fa-fw'></i></a>
          <a class='nav icon-only fix-cursor-default' onclick='history.forward()'><i class='fa fa-arrow-right fa-fw'></i></a>
          <a class='nav icon-only fix-cursor-default' onclick='window.location.reload()'><i class='fa fa-redo fa-fw'></i></a>
          <a class='nav icon-only fix-cursor-default' href='/'><i class='fa fa-home fa-fw'></i></a>
        </li>
      
      <hr>
      
        
      
        
      
        
      
        
      
        
      
        
      
        
          
    <li>
      <a class='vlts-menu fix-cursor-default ' 
        
        
        
          onclick="document.execCommand('print')"
        
        >
        <i class='fa fa-print fa-fw'></i> 打印页面
      </a>
    </li>
  
        
      
        
          <hr>
        
      
        
          
    <li>
      <a class='vlts-menu fix-cursor-default toggle-mode-btn' 
        
        
        
        >
        <i class='fas fa-moon fa-fw'></i> 暗黑模式
      </a>
    </li>
  
        
      
        
          <hr>
        
      
        
          <li class='music name'>
            <p class='nav music-title fix-cursor-default'></p>
          </li>
          <li class='music ctrl'>
            <a class='nav icon-only backward fix-cursor-default' onclick='aplayerBackward()'><i class='fa fa-step-backward fa-fw'></i></a>
            <a class='nav icon-only toggle fix-cursor-default' onclick='aplayerToggle()'><i class='fa fa-play fa-fw'></i></a>
            <a class='nav icon-only forward fix-cursor-default' onclick='aplayerForward()'><i class='fa fa-step-forward fa-fw'></i></a>
          </li>
          <li class='music volume'>
            <a class='nav volume'>
              <div class="aplayer-volume-bar-wrap">
                <div class="aplayer-volume-bar fix-cursor-pointer">
                  <div class="aplayer-volume"></div>
                  <i class='left fa fa-volume-off fa-fw'></i>
                  <i class='right fa fa-volume-up fa-fw'></i>
                </div>
              </div>
            </a>
          </li>
        
      
    </ul>
  </div>

  <script>
    window.document.oncontextmenu = function (event) {
      if (event.ctrlKey) return true;
      if (/Android|webOS|BlackBerry/i.test(navigator.userAgent)) return true;
      return popMenu(event);
    };
    document.addEventListener("click", function (event) {
      var mymenu = document.getElementById('rightmenu-wrapper');
      mymenu.style.display = "none";
    });
    function popMenu(event) {
      var mymenu = document.getElementById('rightmenu-wrapper');
      var menuContent = document.getElementById('rightmenu-content');
      var screenWidth = document.documentElement.clientWidth || document.body.clientWidth;
      var screenHeight = document.documentElement.clientHeight || document.body.clientHeight;
      mymenu.style.left = event.clientX + "px"; // 获取鼠标位置
      mymenu.style.top = event.clientY + "px";
      mymenu.style.display = 'block';
      if (event.clientX * 2 > screenWidth) {
        menuContent.classList.add('left');
      } else {
        menuContent.classList.remove('left');
      }
      if (event.clientY * 2 > screenHeight) {
        menuContent.classList.add('top');
      } else {
        menuContent.classList.remove('top');
      }

      let hrText = document.getElementById('hr-text');
      let hrSrc = document.getElementById('hr-src');
      let hrHref = document.getElementById('hr-href');

      // 选中图片
      let copySrc = document.getElementById('menu-copy-src');
      if (copySrc != undefined) {
        if (event.target.currentSrc) {
          copySrc.style.display = 'block';
          copySrc.addEventListener("click", function (e) {
            copyString(event.target.currentSrc);
          },{once: true});
          hrSrc.style.display = 'block';
        } else {
          copySrc.style.display = 'none';
          hrSrc.style.display = 'none';
        }
      }

      // 选中按钮
      // 判断是不是按钮
      let href = '';
      if (event.path) {
        for (i = 0; i < event.path.length; i++) {
          if (event.path[i].href != undefined && event.path[i].href.length > 0) {
            href = event.path[i].href;
          }
        }
      }

      let copyText = document.getElementById('menu-copy-text');
      copyText.style.display = 'none';
      hrText.style.display = 'none';
      if (href.length == 0) {
        // 选中文本
        if (window.getSelection().toString()) {
          if ('true' == 'true') {
            copyText.style.display = 'block';
            hrText.style.display = 'block';
          }
        }
      }

      // 在新标签页打开
      let openHref = document.getElementById('menu-open-href');
      if (openHref != undefined) {
        if (href.length > 0) {
          openHref.style.display = 'block';
          openHref.addEventListener("click", function (e) {
            window.open(href);
          },{once: true});
          hrHref.style.display = 'block';
        } else {
          openHref.style.display = 'none';
          hrHref.style.display = 'none';
        }
      }
      // 复制链接
      let copyHref = document.getElementById('menu-copy-href');
      if (copyHref != undefined) {
        if (href.length > 0) {
          copyHref.style.display = 'block';
          copyHref.addEventListener("click", function (e) {
            copyString(href);
          },{once: true});
        } else {
          copyHref.style.display = 'none';
        }
      }
      // 有音乐播放器 see: layout/_third-party/aplayer/script.ejs
      
      if(volantis.APlayerLoaded){ // APlayer加载完成？
        // 如果有aplayer，初始化一下
        checkAPlayer();
      }
      
      return false; // 该行代码确保系统自带的右键菜单不会被调出
    }
    function hideMenu() {
      document.getElementById('rightmenu-wrapper').style.display = 'none';
    }
    function copyString(str) {
      const input = document.createElement('input');
      input.setAttribute('readonly', 'readonly');
      document.body.appendChild(input);
      input.setAttribute('value', str);
      input.select();
      document.execCommand('copy');
      document.body.removeChild(input);
    }
    document.execCommand('click');
  </script>




<script>
  function loadIssuesJS() {
    if ($(".md").find(".issues-api").length == 0) return;
	
	  loadScript('/xu-blog/js/issues.js');
	
  };
  $(function () {
    loadIssuesJS();
  });
  volantis.pjax.push(()=>{
	if (typeof IssuesAPI == "undefined") {
	  loadIssuesJS();
	}
  },"IssuesJS")
</script>



  <script defer src="https://cdn.jsdelivr.net/npm/vanilla-lazyload@17.1.0/dist/lazyload.min.js"></script>
<script>
  // https://www.npmjs.com/package/vanilla-lazyload
  // Set the options globally
  // to make LazyLoad self-initialize
  window.lazyLoadOptions = {
    elements_selector: ".lazyload",
    threshold: 0
  };
  // Listen to the initialization event
  // and get the instance of LazyLoad
  window.addEventListener(
    "LazyLoad::Initialized",
    function (event) {
      window.lazyLoadInstance = event.detail.instance;
    },
    false
  );
  document.addEventListener('DOMContentLoaded', function () {
    lazyLoadInstance.update();
  });
  document.addEventListener('pjax:complete', function () {
    lazyLoadInstance.update();
  });
</script>




  

<script>
  window.FPConfig = {
	delay: 0,
	ignoreKeywords: [],
	maxRPS: 5,
	hoverDelay: 25
  };
</script>
<script defer src="https://cdn.jsdelivr.net/gh/gijo-varghese/flying-pages@2.1.2/flying-pages.min.js"></script>





  <script src="https://cdn.jsdelivr.net/npm/clipboard@2/dist/clipboard.min.js"></script>
<script>
    var clipboard = new ClipboardJS('.btn-copy', {
        target: function (trigger) {
            return trigger.nextElementSibling
        }
    });
    function wait(callback, seconds) {
        var timelag = null;
        timelag = window.setTimeout(callback, seconds)
    }
    function pjax_initCopyCode() {
		if($(".highlight .code pre").length+$(".article pre code").length==0)return;
        var copyHtml = '';
        copyHtml += '<button class="btn-copy" data-clipboard-snippet="">';
        copyHtml += '<i class="fas fa-copy"></i><span>COPY</span>';
        copyHtml += '</button>';
        $(".highlight .code pre").before(copyHtml);
        $(".article pre code").before(copyHtml);
        clipboard.off('success').on('success', function (e) {
            let $btn = $(e.trigger);
            $btn.addClass('copied');
            let $icon = $($btn.find('i'));
            $icon.removeClass('fa-copy');
            $icon.addClass('fa-check-circle');
            let $span = $($btn.find('span'));
            $span[0].innerText = 'COPIED';
            wait(function () {
                $icon.removeClass('fa-check-circle');
                $icon.addClass('fa-copy');
                $span[0].innerText = 'COPY'
            }, 2000)
        });
        clipboard.off('error').on('error', function (e) {
            e.clearSelection();
            let $btn = $(e.trigger);
            $btn.addClass('copy-failed');
            let $icon = $($btn.find('i'));
            $icon.removeClass('fa-copy');
            $icon.addClass('fa-times-circle');
            let $span = $($btn.find('span'));
            $span[0].innerText = 'COPY FAILED';
            wait(function () {
                $icon.removeClass('fa-times-circle');
                $icon.addClass('fa-copy');
                $span[0].innerText = 'COPY'
            }, 2000)
        })
    }
    $(function () {
        pjax_initCopyCode()
    });
	volantis.pjax.push(pjax_initCopyCode)
</script>




   <script type="text/javascript">
  loadScript("https://cdn.jsdelivr.net/npm/scrollreveal@4.0.6/dist/scrollreveal.min.js")
  function pjax_scrollrebeal() {
    ScrollReveal().reveal('.l_main .reveal', {
      distance: '32px',
      duration: '800',
      interval: '20',
      scale: '1',
      easing: 'ease-out'
    });
  }
  $(function () {
  var checkScrollReveal = setInterval(function () {
    if ($("#safearea").css("display")!="block") return
    if (typeof ScrollReveal=="undefined") return
    clearInterval(checkScrollReveal)
	pjax_scrollrebeal();
  }, 100)
  });
  volantis.pjax.push(pjax_scrollrebeal)
</script>




  <script>
  let APlayerController = new Object();
  APlayerController.id = '8001964689';  // 设定全局音乐播放ID
  APlayerController.volume = '0.7';
  loadCSS("https://cdn.jsdelivr.net/npm/aplayer@1.10/dist/APlayer.min.css", window.volantis.loadcss);
  // APlayer 需要在  MetingJS 之前加载
  loadScript("https://cdn.jsdelivr.net/npm/aplayer@1.10/dist/APlayer.min.js")
  window.volantis.APlayerLoaded=0 // APlayer加载完成状态
  var checkAPlayer = setInterval(function () {
    if (!window.APlayer) return // APlayer加载完成？
	  if ($("#safearea").css("display")!="block") return // 文章内容加载完成？ see: source/css/first.styl
    clearInterval(checkAPlayer)
	  if (!window.volantis.APlayerLoaded&&!window.MetingJSElement){ // APlayer只能加载一次
      window.volantis.APlayerLoaded=1 // APlayer加载完成
      loadScript("https://cdn.jsdelivr.net/npm/meting@2.0/dist/Meting.min.js") // 加载 MetingJS
	  }
  }, 2500) // 按照网速调节差分2.5s
  // rightmenu see: layout/_partial/rightmenu.ejs

  
    loadScript("/xu-blog/js/aplayer.js")
  

</script>




  
  
<script src="https://cdn.jsdelivr.net/gh/HCLonely/Valine@latest/dist/Valine.min.js"></script>


<script>
  function emoji(path, idx, ext) {
    return path + "/" + path + "-" + idx + "." + ext;
  }
  var emojiMaps = {
    "doge": "https://cdn.jsdelivr.net/gh/zyoushuo/Blog@master/emoji/bilibili/doge.png",
    "亲亲": "https://cdn.jsdelivr.net/gh/zyoushuo/Blog@master/emoji/bilibili/亲亲.png",
    "偷笑": "https://cdn.jsdelivr.net/gh/zyoushuo/Blog@master/emoji/bilibili/偷笑.png",  
    "再见": "https://cdn.jsdelivr.net/gh/zyoushuo/Blog@master/emoji/bilibili/再见.png",
    "冷漠": "https://cdn.jsdelivr.net/gh/zyoushuo/Blog@master/emoji/bilibili/冷漠.png",
    "发怒": "https://cdn.jsdelivr.net/gh/zyoushuo/Blog@master/emoji/bilibili/发怒.png",
    "发财": "https://cdn.jsdelivr.net/gh/zyoushuo/Blog@master/emoji/bilibili/发财.png",
    "可爱": "https://cdn.jsdelivr.net/gh/zyoushuo/Blog@master/emoji/bilibili/可爱.png",
    "QQ-0": "https://7.dusays.com/2021/01/15/28896e0ad6fd2.gif",
	"QQ-1": "https://7.dusays.com/2021/01/15/e1b49acc90150.gif",
	"QQ-10": "https://7.dusays.com/2021/01/15/ccf7ecc0f3629.gif",
	// "QQ-100": "https://7.dusays.com/2021/01/15/d9347f35566e9.gif",
	// "QQ-101": "https://7.dusays.com/2021/01/15/5cf591c70871b.gif",
	// "QQ-102": "https://7.dusays.com/2021/01/15/a54757a19c9b0.gif",
	// "QQ-103": "https://7.dusays.com/2021/01/15/d305b3e66f08e.gif",
	// "QQ-104": "https://7.dusays.com/2021/01/15/e5aac17baab3b.gif",
	// "QQ-105": "https://7.dusays.com/2021/01/15/8143a3f5f096f.gif",
	// "QQ-106": "https://7.dusays.com/2021/01/15/c414277f1a604.gif",
	// "QQ-107": "https://7.dusays.com/2021/01/15/a2d76a0d67386.gif",
	// "QQ-108": "https://7.dusays.com/2021/01/15/6add7b094fe26.gif",
	// "QQ-109": "https://7.dusays.com/2021/01/15/6b959f0e83bbb.gif",
	// "QQ-11": "https://7.dusays.com/2021/01/15/8c4388560de79.gif",
	// "QQ-110": "https://7.dusays.com/2021/01/15/cbd1fc6ade730.gif",
	// "QQ-111": "https://7.dusays.com/2021/01/15/e32ed216e81e8.gif",
	// "QQ-112": "https://7.dusays.com/2021/01/15/f680f2639d9ae.gif",
	// "QQ-113": "https://7.dusays.com/2021/01/15/16830bae9b7ab.gif",
	// "QQ-114": "https://7.dusays.com/2021/01/15/907af163812f4.gif",
	// "QQ-115": "https://7.dusays.com/2021/01/15/7997817d2503d.gif",
	// "QQ-116": "https://7.dusays.com/2021/01/15/fac5675efa0e1.gif",
	// "QQ-117": "https://7.dusays.com/2021/01/15/d07f738e4c604.gif",
	// "QQ-118": "https://7.dusays.com/2021/01/15/05955be86e552.gif",
	// "QQ-119": "https://7.dusays.com/2021/01/15/f0b5dae50d7b6.gif",
	// "QQ-12": "https://7.dusays.com/2021/01/15/92ba48a45b920.gif",
	// "QQ-120": "https://7.dusays.com/2021/01/15/7f9581a4af35f.gif",
	// "QQ-121": "https://7.dusays.com/2021/01/15/667b3c4bc1bc8.gif",
	// "QQ-122": "https://7.dusays.com/2021/01/15/69386ba3437cc.gif",
	// "QQ-123": "https://7.dusays.com/2021/01/15/6b8ef181a5aa2.gif",
	// "QQ-124": "https://7.dusays.com/2021/01/15/3cde111610151.gif",
	// "QQ-125": "https://7.dusays.com/2021/01/15/6f6d89214d8b3.gif",
	// "QQ-126": "https://7.dusays.com/2021/01/15/940b26f3bd37a.gif",
	// "QQ-127": "https://7.dusays.com/2021/01/15/bd7f7f21e3fe0.gif",
	// "QQ-128": "https://7.dusays.com/2021/01/15/b4c458b5a8621.gif",
	// "QQ-129": "https://7.dusays.com/2021/01/15/b95de272e27ba.gif",
	// "QQ-13": "https://7.dusays.com/2021/01/15/46f812e5e0956.gif",
	// "QQ-130": "https://7.dusays.com/2021/01/15/d927193fcff8c.gif",
	// "QQ-131": "https://7.dusays.com/2021/01/15/391a1103dace4.gif",
	// "QQ-132": "https://7.dusays.com/2021/01/15/fc3602298f0f1.gif",
	// "QQ-133": "https://7.dusays.com/2021/01/15/33017fe6c64c1.gif",
	// "QQ-134": "https://7.dusays.com/2021/01/15/1d3f0e3415090.gif",
	// "QQ-135": "https://7.dusays.com/2021/01/15/e302919641d8c.gif",
	// "QQ-136": "https://7.dusays.com/2021/01/15/e60ff59529091.gif",
	// "QQ-137": "https://7.dusays.com/2021/01/15/8e07d67cccc64.gif",
	// "QQ-138": "https://7.dusays.com/2021/01/15/b012f7df8af71.gif",
	// "QQ-139": "https://7.dusays.com/2021/01/15/6824a0ac0138e.gif",
	// "QQ-14": "https://7.dusays.com/2021/01/15/e1c9de290a4b9.gif",
	// "QQ-140": "https://7.dusays.com/2021/01/15/b5f5bbc92b0eb.gif",
	// "QQ-141": "https://7.dusays.com/2021/01/15/a7c1a56b40a72.gif",
	// "QQ-142": "https://7.dusays.com/2021/01/15/6055240f4f3ec.gif",
	// "QQ-143": "https://7.dusays.com/2021/01/15/e5e01f51d3397.gif",
	// "QQ-144": "https://7.dusays.com/2021/01/15/581e6465f99d2.gif",
	// "QQ-145": "https://7.dusays.com/2021/01/15/59bc408781170.gif",
	// "QQ-146": "https://7.dusays.com/2021/01/15/46fa2ac201d46.gif",
	// "QQ-147": "https://7.dusays.com/2021/01/15/ff6ba63ad179b.gif",
	// "QQ-148": "https://7.dusays.com/2021/01/15/a266c3d930e6c.gif",
	// "QQ-149": "https://7.dusays.com/2021/01/15/5dbf143c14332.gif",
	// "QQ-15": "https://7.dusays.com/2021/01/15/49fadb70d4d4a.gif",
	// "QQ-150": "https://7.dusays.com/2021/01/15/44d966569704d.gif",
	// "QQ-151": "https://7.dusays.com/2021/01/15/d724d84b59da6.gif",
	// "QQ-152": "https://7.dusays.com/2021/01/15/45159da4cbbc1.gif",
	// "QQ-153": "https://7.dusays.com/2021/01/15/148b7a971564a.gif",
	// "QQ-154": "https://7.dusays.com/2021/01/15/e4836ac7b02fd.gif",
	// "QQ-155": "https://7.dusays.com/2021/01/15/07a7e803090c5.gif",
	// "QQ-156": "https://7.dusays.com/2021/01/15/727bcb256d5bf.gif",
	// "QQ-157": "https://7.dusays.com/2021/01/15/be01981cfc259.gif",
	// "QQ-158": "https://7.dusays.com/2021/01/15/ec85fd8268395.gif",
	// "QQ-159": "https://7.dusays.com/2021/01/15/2725fbfc403ba.gif",
	// "QQ-16": "https://7.dusays.com/2021/01/15/b91fc930f3f5f.gif",
	// "QQ-160": "https://7.dusays.com/2021/01/15/0b000885b5287.gif",
	// "QQ-161": "https://7.dusays.com/2021/01/15/b2a25f4489cad.gif",
	// "QQ-162": "https://7.dusays.com/2021/01/15/8463bfc591e84.gif",
	// "QQ-163": "https://7.dusays.com/2021/01/15/525ad959adf90.gif",
	// "QQ-164": "https://7.dusays.com/2021/01/15/44d16f9f9e9d6.gif",
	// "QQ-165": "https://7.dusays.com/2021/01/15/23afc128fe8aa.gif",
	// "QQ-166": "https://7.dusays.com/2021/01/15/c79d957438c16.gif",
	// "QQ-167": "https://7.dusays.com/2021/01/15/77802b6a1bf7c.gif",
	// "QQ-168": "https://7.dusays.com/2021/01/15/863c3b2574eb8.gif",
	// "QQ-169": "https://7.dusays.com/2021/01/15/d55715888a6d0.gif",
	// "QQ-17": "https://7.dusays.com/2021/01/15/300717a56c5c0.gif",
	// "QQ-170": "https://7.dusays.com/2021/01/15/9547eb290aa3c.gif",
	// "QQ-171": "https://7.dusays.com/2021/01/15/e21554f3564f4.gif",
	// "QQ-172": "https://7.dusays.com/2021/01/15/313498d46cfb4.gif",
	// "QQ-173": "https://7.dusays.com/2021/01/15/513fbc423a416.gif",
	// "QQ-174": "https://7.dusays.com/2021/01/15/5d05a5e59e001.gif",
	// "QQ-175": "https://7.dusays.com/2021/01/15/af3b5ac5740eb.gif",
	// "QQ-176": "https://7.dusays.com/2021/01/15/e90117a9e5b01.gif",
	// "QQ-177": "https://7.dusays.com/2021/01/15/0173a13106d22.gif",
	// "QQ-178": "https://7.dusays.com/2021/01/15/ac5293255b949.gif",
	// "QQ-179": "https://7.dusays.com/2021/01/15/12acdb0f99e16.gif",
	// "QQ-18": "https://7.dusays.com/2021/01/15/0b8c62f76937f.gif",
	// "QQ-180": "https://7.dusays.com/2021/01/15/a0dbd5f305b88.gif",
	// "QQ-181": "https://7.dusays.com/2021/01/15/31adddf7ba95d.gif",
	// "QQ-182": "https://7.dusays.com/2021/01/15/883f3559a5835.gif",
	// "QQ-183": "https://7.dusays.com/2021/01/15/f771c3e2ebce6.gif",
	// "QQ-184": "https://7.dusays.com/2021/01/15/1b129a5eeee94.gif",
	// "QQ-185": "https://7.dusays.com/2021/01/15/f485dd61e6ae7.gif",
	// "QQ-186": "https://7.dusays.com/2021/01/15/7ac4c7b7a5ebf.gif",
	// "QQ-187": "https://7.dusays.com/2021/01/15/8717659515b30.gif",
	// "QQ-188": "https://7.dusays.com/2021/01/15/731cad82d4856.gif",
	// "QQ-189": "https://7.dusays.com/2021/01/15/898b7bcd7e887.gif",
	// "QQ-19": "https://7.dusays.com/2021/01/15/b4f0b9b412587.gif",
	// "QQ-190": "https://7.dusays.com/2021/01/15/6223952a4197f.gif",
	// "QQ-191": "https://7.dusays.com/2021/01/15/1b43cbf23c8e5.gif",
	// "QQ-192": "https://7.dusays.com/2021/01/15/4bcd98340b6b8.gif",
	// "QQ-193": "https://7.dusays.com/2021/01/15/8d4df30c31631.gif",
	// "QQ-194": "https://7.dusays.com/2021/01/15/39708ccd71a95.gif",
	// "QQ-195": "https://7.dusays.com/2021/01/15/0009210ca52f8.gif",
	// "QQ-196": "https://7.dusays.com/2021/01/15/8c5c13adbdd77.gif",
	// "QQ-197": "https://7.dusays.com/2021/01/15/43e12ffc82f3c.gif",
	// "QQ-198": "https://7.dusays.com/2021/01/15/f6639a3dc72a3.gif",
	// "QQ-199": "https://7.dusays.com/2021/01/15/70d4041539912.gif",
	// "QQ-2": "https://7.dusays.com/2021/01/15/600eabcdab574.gif",
	// "QQ-20": "https://7.dusays.com/2021/01/15/494844390362d.gif",
	// "QQ-200": "https://7.dusays.com/2021/01/15/d998032a584e9.gif",
	// "QQ-201": "https://7.dusays.com/2021/01/15/bd4cb0b7768e3.gif",
	// "QQ-202": "https://7.dusays.com/2021/01/15/3703881a2d813.gif",
	// "QQ-203": "https://7.dusays.com/2021/01/15/e59beb80fd449.gif",
	// "QQ-204": "https://7.dusays.com/2021/01/15/1c584da0914bd.gif",
	// "QQ-205": "https://7.dusays.com/2021/01/15/2b666bead720b.gif",
	// "QQ-206": "https://7.dusays.com/2021/01/15/ea16ee931c8da.gif",
	// "QQ-207": "https://7.dusays.com/2021/01/15/8708ed000df31.gif",
	"QQ-21": "https://7.dusays.com/2021/01/15/027775e9743ab.gif",
	"QQ-22": "https://7.dusays.com/2021/01/15/0c23acb228950.gif",
	"QQ-23": "https://7.dusays.com/2021/01/15/8acb1e4210aea.gif",
	"QQ-24": "https://7.dusays.com/2021/01/15/9de819ab7c8cb.gif",
	"QQ-25": "https://7.dusays.com/2021/01/15/5993ed35f6d49.gif",
	"QQ-26": "https://7.dusays.com/2021/01/15/8fe0ec5ef3f69.gif",
	"QQ-27": "https://7.dusays.com/2021/01/15/9f7ff1464be4c.gif",
	"QQ-28": "https://7.dusays.com/2021/01/15/ced6f2c057160.gif",
	"QQ-29": "https://7.dusays.com/2021/01/15/404754a6c6fa2.gif",
	"QQ-3": "https://7.dusays.com/2021/01/15/cd20be11abcce.gif",
	"QQ-30": "https://7.dusays.com/2021/01/15/ab932a53b58a3.gif",
	"QQ-31": "https://7.dusays.com/2021/01/15/2d366ab8e5e9e.gif",
	"QQ-32": "https://7.dusays.com/2021/01/15/837b455fd15fc.gif",
	"QQ-33": "https://7.dusays.com/2021/01/15/196a7ac1f41f1.gif",
	"QQ-34": "https://7.dusays.com/2021/01/15/aeaa075dbd734.gif",
	"QQ-35": "https://7.dusays.com/2021/01/15/3a8f0774b9dae.gif",
	"QQ-36": "https://7.dusays.com/2021/01/15/0e18c10485931.gif",
	"QQ-37": "https://7.dusays.com/2021/01/15/9605e27e400c0.gif",
	"QQ-38": "https://7.dusays.com/2021/01/15/34f2ef866b3ca.gif",
	"QQ-39": "https://7.dusays.com/2021/01/15/9241b131f6d52.gif",
	"QQ-4": "https://7.dusays.com/2021/01/15/110c67a8cd42a.gif",
	"QQ-40": "https://7.dusays.com/2021/01/15/468fc2660dc41.gif",
	"QQ-41": "https://7.dusays.com/2021/01/15/dd4b05f14e180.gif",
	"QQ-42": "https://7.dusays.com/2021/01/15/0c1d65cad7ddd.gif",
	"QQ-43": "https://7.dusays.com/2021/01/15/ca5dfef7dc5b6.gif",
	"QQ-44": "https://7.dusays.com/2021/01/15/627cd1c4d591d.gif",
	"QQ-45": "https://7.dusays.com/2021/01/15/66d92d3ff3297.gif",
	"QQ-46": "https://7.dusays.com/2021/01/15/713aae4354061.gif",
	"QQ-47": "https://7.dusays.com/2021/01/15/927f5e879af60.gif",
	"QQ-48": "https://7.dusays.com/2021/01/15/62d20c83f754e.gif",
	"QQ-49": "https://7.dusays.com/2021/01/15/0aa84e1f7c51d.gif",
	"QQ-5": "https://7.dusays.com/2021/01/15/d4fbad555d826.gif",
	"QQ-50": "https://7.dusays.com/2021/01/15/5a8f103c7f7a6.gif",
	"QQ-51": "https://7.dusays.com/2021/01/15/4b474c7966afe.gif",
	"QQ-52": "https://7.dusays.com/2021/01/15/a7c1a56b40a72.gif",
	"QQ-53": "https://7.dusays.com/2021/01/15/d58b434fe8acf.gif",
	"QQ-54": "https://7.dusays.com/2021/01/15/e7477cbce1c30.gif",
	"QQ-55": "https://7.dusays.com/2021/01/15/fc97eaa6e5853.gif",
	"QQ-56": "https://7.dusays.com/2021/01/15/06fd40a7bf77d.gif",
	"QQ-57": "https://7.dusays.com/2021/01/15/28812822c01aa.gif",
	"QQ-58": "https://7.dusays.com/2021/01/15/7997817d2503d.gif",
	"QQ-59": "https://7.dusays.com/2021/01/15/805daa7195f2c.gif",
	"QQ-6": "https://7.dusays.com/2021/01/15/0a1bf206e6ae9.gif",
	"QQ-60": "https://7.dusays.com/2021/01/15/9a92f54aca20d.gif",
	"QQ-61": "https://7.dusays.com/2021/01/15/926dd2cba14c6.gif",
	"QQ-62": "https://7.dusays.com/2021/01/15/9037338ec9bc5.gif",
	"QQ-63": "https://7.dusays.com/2021/01/15/8ab1357161687.gif",
	"QQ-64": "https://7.dusays.com/2021/01/15/cfacd1babd14b.gif",
	"QQ-65": "https://7.dusays.com/2021/01/15/87f81ce1fd008.gif",
	"QQ-66": "https://7.dusays.com/2021/01/15/b6a582fed3bda.gif",
	"QQ-67": "https://7.dusays.com/2021/01/15/8c5b85d3cd3c7.gif",
	"QQ-68": "https://7.dusays.com/2021/01/15/d927193fcff8c.gif",
	"QQ-69": "https://7.dusays.com/2021/01/15/b95de272e27ba.gif",
	"QQ-7": "https://7.dusays.com/2021/01/15/4c0631cb31bfc.gif",
	"QQ-70": "https://7.dusays.com/2021/01/15/f09d97e885c26.gif",
	"QQ-71": "https://7.dusays.com/2021/01/15/3698c4fe6151f.gif",
	"QQ-72": "https://7.dusays.com/2021/01/15/429eae09fcaed.gif",
	"QQ-73": "https://7.dusays.com/2021/01/15/006232fd75b4f.gif",
	"QQ-74": "https://7.dusays.com/2021/01/15/b5302a85814b7.gif",
	"QQ-75": "https://7.dusays.com/2021/01/15/0a05c30806fe0.gif",
	"QQ-76": "https://7.dusays.com/2021/01/15/8b670e52b61ec.gif",
	"QQ-77": "https://7.dusays.com/2021/01/15/e7bbed5bda51a.gif",
	"QQ-78": "https://7.dusays.com/2021/01/15/02b1e32036ed4.gif",
	"QQ-79": "https://7.dusays.com/2021/01/15/319b45bdaced1.gif",
	"QQ-8": "https://7.dusays.com/2021/01/15/514fc3a849b94.gif",
	"QQ-80": "https://7.dusays.com/2021/01/15/948b0bb1b1147.gif",
	"QQ-81": "https://7.dusays.com/2021/01/15/8a268e9f4f6c4.gif",
	"QQ-82": "https://7.dusays.com/2021/01/15/ef898256928e9.gif",
	"QQ-83": "https://7.dusays.com/2021/01/15/d49b581e203cb.gif",
	"QQ-84": "https://7.dusays.com/2021/01/15/2dc09beb0f627.gif",
	"QQ-85": "https://7.dusays.com/2021/01/15/480e405d8aab9.gif",
	"QQ-86": "https://7.dusays.com/2021/01/15/682341ae85a49.gif",
	"QQ-87": "https://7.dusays.com/2021/01/15/1c7ba3af0f0f8.gif",
	"QQ-88": "https://7.dusays.com/2021/01/15/81a32d6380404.gif",
	"QQ-89": "https://7.dusays.com/2021/01/15/161407c141f74.gif",
	"QQ-9": "https://7.dusays.com/2021/01/15/333ca8158377b.gif",
	"QQ-90": "https://7.dusays.com/2021/01/15/aa757c7f53f66.gif",
	"QQ-91": "https://7.dusays.com/2021/01/15/766fd95462727.gif",
	"QQ-92": "https://7.dusays.com/2021/01/15/4eff2dfd36cfb.gif",
	"QQ-93": "https://7.dusays.com/2021/01/15/0ef3ae2acddf0.gif",
	"QQ-94": "https://7.dusays.com/2021/01/15/807a44282df46.gif",
	"QQ-95": "https://7.dusays.com/2021/01/15/f84ff66189a8d.gif",
	"QQ-96": "https://7.dusays.com/2021/01/15/e0454a54ad84b.gif",
	"QQ-97": "https://7.dusays.com/2021/01/15/b63a098facfb2.gif",
	"QQ-98": "https://7.dusays.com/2021/01/15/3b6ed67c2a54f.gif",
	"QQ-99": "https://7.dusays.com/2021/01/15/dad0a76be3d48.gif",
	"QQ-不你不想": "https://7.dusays.com/2021/01/18/1fe9d7fc2d679.gif",
	"QQ-哇哦": "https://7.dusays.com/2021/01/18/0c8030b35dc45.gif",
	"QQ-哦": "https://7.dusays.com/2021/01/18/e2deda94f7fe9.gif",
	"QQ-打call": "https://7.dusays.com/2021/01/18/8038a5d46e822.gif",
	"QQ-打脸": "https://7.dusays.com/2021/01/18/2cc550223b16a.gif",
	"QQ-摸鱼": "https://7.dusays.com/2021/01/18/60891c4e72059.gif",
	"QQ-敬礼": "https://7.dusays.com/2021/01/18/27db33aa7a424.gif",
	"QQ-无眼笑": "https://7.dusays.com/2021/01/18/5c0060e18accf.gif",
	"QQ-比心": "https://7.dusays.com/2021/01/18/eee0aa3f76053.gif",
	"QQ-没眼看": "https://7.dusays.com/2021/01/18/dedd7c3530aa4.gif",
	"QQ-滚": "https://7.dusays.com/2021/01/18/5ba245a20c154.gif",
	"QQ-狂笑": "https://7.dusays.com/2021/01/18/d72781e9e35dd.gif",
	"QQ-睁眼": "https://7.dusays.com/2021/01/18/3b847d18f10c8.gif",
	"QQ-考虑中": "https://7.dusays.com/2021/01/18/0fc06cf6d8982.gif",
	"QQ-面无表情": "https://7.dusays.com/2021/01/18/bf5a929ca94f6.gif",
	"QQ-魔鬼笑": "https://7.dusays.com/2021/01/18/69ae4fba3efd1.gif",
    "aru-1": "https://7.dusays.com/2021/01/15/3c76dffbc08a5.png",
	"aru-10": "https://7.dusays.com/2021/01/15/92b7ddcab54f4.png",
	// "aru-100": "https://7.dusays.com/2021/01/15/dccc901971eb8.png",
	// "aru-101": "https://7.dusays.com/2021/01/15/f4b7a25f5e80f.png",
	// "aru-102": "https://7.dusays.com/2021/01/15/b7d16abb93551.png",
	// "aru-103": "https://7.dusays.com/2021/01/15/760903a75e3f0.png",
	// "aru-104": "https://7.dusays.com/2021/01/15/41652c09ec628.png",
	// "aru-105": "https://7.dusays.com/2021/01/15/5acbd02982825.png",
	// "aru-106": "https://7.dusays.com/2021/01/15/a3e8e687ffbd1.png",
	// "aru-107": "https://7.dusays.com/2021/01/15/ced5a8ba294d6.png",
	// "aru-108": "https://7.dusays.com/2021/01/15/f16fddc39c3e0.png",
	// "aru-109": "https://7.dusays.com/2021/01/15/7adc26724b238.png",
	// "aru-11": "https://7.dusays.com/2021/01/15/ed227278c834c.png",
	// "aru-110": "https://7.dusays.com/2021/01/15/ab46a89ea5545.png",
	// "aru-111": "https://7.dusays.com/2021/01/15/40f50f5235bdf.png",
	// "aru-112": "https://7.dusays.com/2021/01/15/065aa0cb9b7f5.png",
	// "aru-113": "https://7.dusays.com/2021/01/15/d1646bb73325b.png",
	// "aru-114": "https://7.dusays.com/2021/01/15/0ae72797dfe96.png",
	// "aru-115": "https://7.dusays.com/2021/01/15/cfb7cba6a875d.png",
	// "aru-116": "https://7.dusays.com/2021/01/15/707bafcea9e9f.png",
	// "aru-117": "https://7.dusays.com/2021/01/15/f8976c97a6cf4.png",
	// "aru-118": "https://7.dusays.com/2021/01/15/838fabb97ebfd.png",
	// "aru-119": "https://7.dusays.com/2021/01/15/d817a6b920d5f.png",
	// "aru-12": "https://7.dusays.com/2021/01/15/48d687f3f2537.png",
	// "aru-120": "https://7.dusays.com/2021/01/15/989802baba9ef.png",
	// "aru-121": "https://7.dusays.com/2021/01/15/eb0b934164a12.png",
	// "aru-122": "https://7.dusays.com/2021/01/15/102f033312ce8.png",
	// "aru-123": "https://7.dusays.com/2021/01/15/a3be0a2a7bc6c.png",
	// "aru-124": "https://7.dusays.com/2021/01/15/19615a586e462.png",
	// "aru-125": "https://7.dusays.com/2021/01/15/9838d666fb467.png",
	// "aru-126": "https://7.dusays.com/2021/01/15/68bdc9c3d4f51.png",
	// "aru-127": "https://7.dusays.com/2021/01/15/d1a20a1fadb2c.png",
	// "aru-128": "https://7.dusays.com/2021/01/15/9a94f39152ae9.png",
	// "aru-129": "https://7.dusays.com/2021/01/15/ac1bb93f89256.png",
	// "aru-13": "https://7.dusays.com/2021/01/15/4cbabd24c90ab.png",
	// "aru-130": "https://7.dusays.com/2021/01/15/03d6815965169.png",
	// "aru-131": "https://7.dusays.com/2021/01/15/53d779031ef12.png",
	// "aru-132": "https://7.dusays.com/2021/01/15/cec3132e27893.png",
	// "aru-133": "https://7.dusays.com/2021/01/15/8c08f209610c7.png",
	// "aru-134": "https://7.dusays.com/2021/01/15/fb0271308bb44.png",
	// "aru-135": "https://7.dusays.com/2021/01/15/f8d4f09764070.png",
	// "aru-136": "https://7.dusays.com/2021/01/15/81b10f3adee22.png",
	// "aru-137": "https://7.dusays.com/2021/01/15/ff1e65528a19d.png",
	// "aru-138": "https://7.dusays.com/2021/01/15/4811f82d526aa.png",
	// "aru-139": "https://7.dusays.com/2021/01/15/2323f6d5e7aa2.png",
	// "aru-14": "https://7.dusays.com/2021/01/15/cc8732c5149aa.png",
	// "aru-140": "https://7.dusays.com/2021/01/15/19a7185ad49e7.png",
	// "aru-141": "https://7.dusays.com/2021/01/15/d40099d7767d9.png",
	// "aru-142": "https://7.dusays.com/2021/01/15/cabe24a7c1651.png",
	// "aru-143": "https://7.dusays.com/2021/01/15/2a636495ae969.png",
	// "aru-144": "https://7.dusays.com/2021/01/15/48cabebdda3bc.png",
	// "aru-145": "https://7.dusays.com/2021/01/15/355a6a7db1666.png",
	// "aru-146": "https://7.dusays.com/2021/01/15/b4056691058a4.png",
	// "aru-147": "https://7.dusays.com/2021/01/15/6170ff43d7d81.png",
	// "aru-148": "https://7.dusays.com/2021/01/15/ea1fe65780c01.png",
	// "aru-149": "https://7.dusays.com/2021/01/15/31cd3e036400e.png",
	// "aru-15": "https://7.dusays.com/2021/01/15/7ea813268e085.png",
	// "aru-150": "https://7.dusays.com/2021/01/15/07c1bd09294fc.png",
	// "aru-151": "https://7.dusays.com/2021/01/15/1612f1b86429f.png",
	// "aru-152": "https://7.dusays.com/2021/01/15/068112f3e6bfb.png",
	// "aru-153": "https://7.dusays.com/2021/01/15/bf5c26545b4b9.png",
	// "aru-154": "https://7.dusays.com/2021/01/15/c1585f128482c.png",
	// "aru-155": "https://7.dusays.com/2021/01/15/5bc520f48dd47.png",
	// "aru-156": "https://7.dusays.com/2021/01/15/e0f29261aece3.png",
	// "aru-157": "https://7.dusays.com/2021/01/15/4ce80b4b72daa.png",
	// "aru-158": "https://7.dusays.com/2021/01/15/9b380c52a08d4.png",
	// "aru-159": "https://7.dusays.com/2021/01/15/533d555dce705.png",
	// "aru-16": "https://7.dusays.com/2021/01/15/d9e4e1bfa53c2.png",
	// "aru-160": "https://7.dusays.com/2021/01/15/d18168b006230.png",
	// "aru-161": "https://7.dusays.com/2021/01/15/08b018c527949.png",
	// "aru-162": "https://7.dusays.com/2021/01/15/6ffd546ba2543.png",
	// "aru-163": "https://7.dusays.com/2021/01/15/0b1d052020767.png",
	// "aru-164": "https://7.dusays.com/2021/01/15/9702acc73c18f.png",
	// "aru-165": "https://7.dusays.com/2021/01/15/f849acab82462.png",
	// "aru-166": "https://7.dusays.com/2021/01/15/7cb11dc463c04.png",
	// "aru-167": "https://7.dusays.com/2021/01/15/2527805ee0379.png",
	// "aru-168": "https://7.dusays.com/2021/01/15/988a3156dc27f.png",
	// "aru-169": "https://7.dusays.com/2021/01/15/13db15319f1e7.png",
	// "aru-17": "https://7.dusays.com/2021/01/15/8a22c7c9e9496.png",
	// "aru-170": "https://7.dusays.com/2021/01/15/493853d287b71.png",
	// "aru-171": "https://7.dusays.com/2021/01/15/71408973500e1.png",
	// "aru-172": "https://7.dusays.com/2021/01/15/22dbb7af8c631.png",
	// "aru-173": "https://7.dusays.com/2021/01/15/20b04f0e340e0.png",
	// "aru-174": "https://7.dusays.com/2021/01/15/9fa3e65151771.png",
	// "aru-175": "https://7.dusays.com/2021/01/15/7dec945be6690.png",
	// "aru-176": "https://7.dusays.com/2021/01/15/b250f518ca062.png",
	// "aru-177": "https://7.dusays.com/2021/01/15/3f4f0bb2548ee.png",
	// "aru-178": "https://7.dusays.com/2021/01/15/9f08a07f28a73.png",
	// "aru-179": "https://7.dusays.com/2021/01/15/dee68caa9d247.png",
	// "aru-18": "https://7.dusays.com/2021/01/15/219b14197d03d.png",
	// "aru-180": "https://7.dusays.com/2021/01/15/2f62d01c405f5.png",
	// "aru-181": "https://7.dusays.com/2021/01/15/acef27e473544.png",
	// "aru-182": "https://7.dusays.com/2021/01/15/463df45df5560.png",
	// "aru-183": "https://7.dusays.com/2021/01/15/75cd5ebfa1b8a.png",
	// "aru-184": "https://7.dusays.com/2021/01/15/279d4d62a4da8.png",
	// "aru-185": "https://7.dusays.com/2021/01/15/7c3f512b09e62.png",
	// "aru-186": "https://7.dusays.com/2021/01/15/81499410cfc0a.png",
	// "aru-187": "https://7.dusays.com/2021/01/15/49dfcd473782c.png",
	// "aru-188": "https://7.dusays.com/2021/01/15/70d57e65ebd42.png",
	// "aru-189": "https://7.dusays.com/2021/01/15/0c2c81bcd1c96.png",
	// "aru-19": "https://7.dusays.com/2021/01/15/73b4635341da9.png",
	// "aru-190": "https://7.dusays.com/2021/01/15/2e6dd9c430da1.png",
	// "aru-191": "https://7.dusays.com/2021/01/15/8afa356455966.png",
	// "aru-192": "https://7.dusays.com/2021/01/15/55426cd725403.png",
	// "aru-193": "https://7.dusays.com/2021/01/15/6d784dfa72986.png",
	// "aru-194": "https://7.dusays.com/2021/01/15/fbcf70a39d85e.png",
	// "aru-195": "https://7.dusays.com/2021/01/15/6604abab9263f.png",
	// "aru-196": "https://7.dusays.com/2021/01/15/4e23933188181.png",
	// "aru-197": "https://7.dusays.com/2021/01/15/37d171e1064f9.png",
	// "aru-198": "https://7.dusays.com/2021/01/15/87b001a0b415c.png",
	// "aru-199": "https://7.dusays.com/2021/01/15/d68397564cf26.png",
	// "aru-2": "https://7.dusays.com/2021/01/15/5709e794aa6a3.png",
	// "aru-20": "https://7.dusays.com/2021/01/15/52f5807964b7f.png",
	// "aru-200": "https://7.dusays.com/2021/01/15/9b83ce60b0351.png",
	// "aru-201": "https://7.dusays.com/2021/01/15/1afe2e9175e3b.png",
	// "aru-202": "https://7.dusays.com/2021/01/15/053528a6a4a5c.png",
	// "aru-203": "https://7.dusays.com/2021/01/15/2706f40ca20bc.png",
	// "aru-204": "https://7.dusays.com/2021/01/15/f5667467c7e7d.png",
	// "aru-205": "https://7.dusays.com/2021/01/15/2088c874e95b4.png",
	// "aru-206": "https://7.dusays.com/2021/01/15/dd642b38711f6.png",
	// "aru-207": "https://7.dusays.com/2021/01/15/6d98942dfdbd3.png",
	// "aru-208": "https://7.dusays.com/2021/01/15/ec5ae6099d1a9.png",
	// "aru-209": "https://7.dusays.com/2021/01/15/38b0bba2015e2.png",
	// "aru-21": "https://7.dusays.com/2021/01/15/98d952a1e8937.png",
	// "aru-210": "https://7.dusays.com/2021/01/15/070eef317a0ce.png",
	// "aru-211": "https://7.dusays.com/2021/01/15/2b96ac41d11bb.png",
	// "aru-212": "https://7.dusays.com/2021/01/15/69036025c7fda.png",
	// "aru-213": "https://7.dusays.com/2021/01/15/27d68bcf5e00d.png",
	// "aru-214": "https://7.dusays.com/2021/01/15/8dc7e54b9cfec.png",
	// "aru-215": "https://7.dusays.com/2021/01/15/b202b4b011641.png",
	// "aru-216": "https://7.dusays.com/2021/01/15/f3157721226ed.png",
	// "aru-217": "https://7.dusays.com/2021/01/15/aa0cfa9fe1312.png",
	// "aru-218": "https://7.dusays.com/2021/01/15/9cacd5b8a5c91.png",
	// "aru-219": "https://7.dusays.com/2021/01/15/55a5e92a90737.png",
	// "aru-22": "https://7.dusays.com/2021/01/15/27f0264cff424.png",
	// "aru-220": "https://7.dusays.com/2021/01/15/d296ab1d2df39.png",
	// "aru-221": "https://7.dusays.com/2021/01/15/ce987616831ce.png",
	// "aru-222": "https://7.dusays.com/2021/01/15/363ae6eaa9220.png",
	// "aru-223": "https://7.dusays.com/2021/01/15/1d48575db9e44.png",
	// "aru-224": "https://7.dusays.com/2021/01/15/15b7034d6abc6.png",
	// "aru-225": "https://7.dusays.com/2021/01/15/41a1fd35e3cc9.png",
	// "aru-226": "https://7.dusays.com/2021/01/15/643ddfba64ed1.png",
	// "aru-227": "https://7.dusays.com/2021/01/15/2b3fb00131e54.png",
	// "aru-228": "https://7.dusays.com/2021/01/15/e6a8c634073dc.png",
	// "aru-229": "https://7.dusays.com/2021/01/15/32af4aea40b90.png",
	// "aru-23": "https://7.dusays.com/2021/01/15/1525f8d9a1457.png",
	// "aru-230": "https://7.dusays.com/2021/01/15/6b6af42517da2.png",
	// "aru-231": "https://7.dusays.com/2021/01/15/2c9b6dbf19eb8.png",
	// "aru-232": "https://7.dusays.com/2021/01/15/3c3a8ad01b4a4.png",
	// "aru-233": "https://7.dusays.com/2021/01/15/028c40bb3528d.png",
	// "aru-234": "https://7.dusays.com/2021/01/15/0853994805536.png",
	// "aru-235": "https://7.dusays.com/2021/01/15/8ed5e7bfe3278.png",
	// "aru-236": "https://7.dusays.com/2021/01/15/bade621319e9a.png",
	// "aru-237": "https://7.dusays.com/2021/01/15/ce19f921e061e.png",
	// "aru-238": "https://7.dusays.com/2021/01/15/d7a655866203a.png",
	// "aru-239": "https://7.dusays.com/2021/01/15/689632f1e0225.png",
	// "aru-24": "https://7.dusays.com/2021/01/15/f387626ce69d7.png",
	// "aru-240": "https://7.dusays.com/2021/01/15/71b2ecefe30c3.png",
	// "aru-241": "https://7.dusays.com/2021/01/15/416caf88ea767.png",
	// "aru-242": "https://7.dusays.com/2021/01/15/cdd6a81301bba.png",
	// "aru-243": "https://7.dusays.com/2021/01/15/70ff2d31ff312.png",
	// "aru-244": "https://7.dusays.com/2021/01/15/1c7c8fc45518e.png",
	// "aru-245": "https://7.dusays.com/2021/01/15/99fc606bb8bc8.png",
	// "aru-246": "https://7.dusays.com/2021/01/15/0b2e3ca11da38.png",
	// "aru-247": "https://7.dusays.com/2021/01/15/5cbf96f916b20.png",
	// "aru-248": "https://7.dusays.com/2021/01/15/1ae7a074b1bed.png",
	// "aru-249": "https://7.dusays.com/2021/01/15/c60c531833f20.png",
	// "aru-25": "https://7.dusays.com/2021/01/15/3f51a250d33f4.png",
	// "aru-250": "https://7.dusays.com/2021/01/15/fd8468b269daa.png",
	// "aru-251": "https://7.dusays.com/2021/01/15/cc6710be82e92.png",
	// "aru-252": "https://7.dusays.com/2021/01/15/67e3243207009.png",
	// "aru-253": "https://7.dusays.com/2021/01/15/e964f785eed1a.png",
	// "aru-254": "https://7.dusays.com/2021/01/15/eb23ae2b09ccf.png",
	// "aru-255": "https://7.dusays.com/2021/01/15/60cd001add4cc.png",
	// "aru-256": "https://7.dusays.com/2021/01/15/85284c8f0550a.png",
	// "aru-257": "https://7.dusays.com/2021/01/15/67b8ee40d050d.png",
	// "aru-258": "https://7.dusays.com/2021/01/15/22ec1cc230a10.png",
	// "aru-259": "https://7.dusays.com/2021/01/15/4bc2203c466c8.png",
	// "aru-26": "https://7.dusays.com/2021/01/15/dbbe853e522ca.png",
	// "aru-260": "https://7.dusays.com/2021/01/15/a8aa797852340.png",
	// "aru-261": "https://7.dusays.com/2021/01/15/9dd134619e3af.png",
	// "aru-262": "https://7.dusays.com/2021/01/15/39602b7740ebe.png",
	// "aru-263": "https://7.dusays.com/2021/01/15/3f0bb16986ad7.png",
	// "aru-264": "https://7.dusays.com/2021/01/15/c17df86ecfeb1.png",
	// "aru-265": "https://7.dusays.com/2021/01/15/9fa566e43f33e.png",
	// "aru-266": "https://7.dusays.com/2021/01/15/7eef73b7a0f92.png",
	// "aru-267": "https://7.dusays.com/2021/01/15/9de5b757ca018.png",
	// "aru-268": "https://7.dusays.com/2021/01/15/c4cc43c127a95.png",
	"aru-269": "https://7.dusays.com/2021/01/15/8afc55f4d179c.png",
	"aru-27": "https://7.dusays.com/2021/01/15/a40dbec3b222d.png",
	"aru-270": "https://7.dusays.com/2021/01/15/6e90cc985b0f8.png",
	"aru-271": "https://7.dusays.com/2021/01/15/960bbf88b9ff3.png",
	"aru-272": "https://7.dusays.com/2021/01/15/73ad16a7e23d5.png",
	"aru-273": "https://7.dusays.com/2021/01/15/41ddcc80da6f9.png",
	"aru-274": "https://7.dusays.com/2021/01/15/9a97268f13f51.png",
	"aru-275": "https://7.dusays.com/2021/01/15/56204272441e0.png",
	"aru-276": "https://7.dusays.com/2021/01/15/ffc65fbc89809.png",
	"aru-277": "https://7.dusays.com/2021/01/15/650df4941e97b.png",
	"aru-278": "https://7.dusays.com/2021/01/15/3e01c067f0330.png",
	"aru-279": "https://7.dusays.com/2021/01/15/328cdd15003d8.png",
	"aru-28": "https://7.dusays.com/2021/01/15/159fca24950a4.png",
	"aru-280": "https://7.dusays.com/2021/01/15/b95abd64ce3bf.png",
	"aru-281": "https://7.dusays.com/2021/01/15/8231ca42c0762.png",
	"aru-282": "https://7.dusays.com/2021/01/15/ebb28eec4168f.png",
	"aru-283": "https://7.dusays.com/2021/01/15/917b61b64f535.png",
	"aru-284": "https://7.dusays.com/2021/01/15/96c73d4789f6d.png",
	"aru-285": "https://7.dusays.com/2021/01/15/de0c46b7c03ad.png",
	"aru-286": "https://7.dusays.com/2021/01/15/9e2b1be1b6a31.png",
	"aru-287": "https://7.dusays.com/2021/01/15/2a8445979534b.png",
	"aru-288": "https://7.dusays.com/2021/01/15/6ca99d6a001e0.png",
	"aru-289": "https://7.dusays.com/2021/01/15/923a08c31a21e.png",
	"aru-29": "https://7.dusays.com/2021/01/15/7adbe67ea05d5.png",
	"aru-290": "https://7.dusays.com/2021/01/15/8d3df2b1be6be.png",
	"aru-291": "https://7.dusays.com/2021/01/15/712394efad4f5.png",
	"aru-292": "https://7.dusays.com/2021/01/15/a02ead705a1cc.png",
	"aru-293": "https://7.dusays.com/2021/01/15/a0984310bb6ef.png",
	"aru-294": "https://7.dusays.com/2021/01/15/442474e817a98.png",
	"aru-295": "https://7.dusays.com/2021/01/15/8778c841706ff.png",
	"aru-296": "https://7.dusays.com/2021/01/15/afeb9dda453e4.png",
	"aru-297": "https://7.dusays.com/2021/01/15/a91f1cdc4d0b9.png",
	"aru-298": "https://7.dusays.com/2021/01/15/af5282dd19c4a.png",
	"aru-299": "https://7.dusays.com/2021/01/15/b0961218de45a.png",
	"aru-3": "https://7.dusays.com/2021/01/15/be3ee1ec1b4f2.png",
	"aru-30": "https://7.dusays.com/2021/01/15/63a7cd8ef8e13.png",
	"aru-300": "https://7.dusays.com/2021/01/15/7a78c95591272.png",
	"aru-301": "https://7.dusays.com/2021/01/15/e72778666fc94.png",
	"aru-302": "https://7.dusays.com/2021/01/15/7a32506fba997.png",
	"aru-303": "https://7.dusays.com/2021/01/15/9986733c82bd7.png",
	"aru-304": "https://7.dusays.com/2021/01/15/5aed342ac946c.png",
	"aru-305": "https://7.dusays.com/2021/01/15/f2ecb46b32b67.png",
	"aru-306": "https://7.dusays.com/2021/01/15/3f0cab2aa9b6a.png",
	"aru-31": "https://7.dusays.com/2021/01/15/b737e310cef3e.png",
	"aru-32": "https://7.dusays.com/2021/01/15/d82a724abae8f.png",
	"aru-33": "https://7.dusays.com/2021/01/15/35b4fb2c13b02.png",
	"aru-34": "https://7.dusays.com/2021/01/15/392d9c83ac1fa.png",
	"aru-35": "https://7.dusays.com/2021/01/15/120187e6d00b6.png",
	"aru-36": "https://7.dusays.com/2021/01/15/256a3bdfeacb0.png",
	"aru-37": "https://7.dusays.com/2021/01/15/494dd6d70ba30.png",
	"aru-38": "https://7.dusays.com/2021/01/15/3c238e67e0aa5.png",
	"aru-39": "https://7.dusays.com/2021/01/15/38484bc6aca95.png",
	"aru-4": "https://7.dusays.com/2021/01/15/f30737a55153a.png",
	"aru-40": "https://7.dusays.com/2021/01/15/7a111e9ab75ba.png",
	"aru-41": "https://7.dusays.com/2021/01/15/a8dac39c73095.png",
	"aru-42": "https://7.dusays.com/2021/01/15/950dd43a5e40e.png",
	"aru-43": "https://7.dusays.com/2021/01/15/955bb224e3278.png",
	"aru-44": "https://7.dusays.com/2021/01/15/07956c9604521.png",
	"aru-45": "https://7.dusays.com/2021/01/15/345e7ad78539d.png",
	"aru-46": "https://7.dusays.com/2021/01/15/c1dafa8b0689e.png",
	"aru-47": "https://7.dusays.com/2021/01/15/78fe6d0e83060.png",
	"aru-48": "https://7.dusays.com/2021/01/15/ce66dc53b20d1.png",
	"aru-49": "https://7.dusays.com/2021/01/15/c7cbf7b8a4b14.png",
	"aru-5": "https://7.dusays.com/2021/01/15/3796d5897e978.png",
	"aru-50": "https://7.dusays.com/2021/01/15/e84dbb6878bb7.png",
	"aru-51": "https://7.dusays.com/2021/01/15/50ad8d83ce40b.png",
	"aru-52": "https://7.dusays.com/2021/01/15/82d343382896f.png",
	"aru-53": "https://7.dusays.com/2021/01/15/21473331ecd66.png",
	"aru-54": "https://7.dusays.com/2021/01/15/5b64546119f0a.png",
	"aru-55": "https://7.dusays.com/2021/01/15/711ee4c3ad9e3.png",
	"aru-56": "https://7.dusays.com/2021/01/15/ffcf39b2e8db5.png",
	"aru-57": "https://7.dusays.com/2021/01/15/8e4d4e7d9e2db.png",
	"aru-58": "https://7.dusays.com/2021/01/15/4ffe9d5cdbf18.png",
	"aru-59": "https://7.dusays.com/2021/01/15/bd9cb4ed4e82d.png",
	"aru-6": "https://7.dusays.com/2021/01/15/ec2e47884ecbc.png",
	"aru-60": "https://7.dusays.com/2021/01/15/43842309caca3.png",
	"aru-61": "https://7.dusays.com/2021/01/15/bdf18cb54c06c.png",
	"aru-62": "https://7.dusays.com/2021/01/15/a5e7abe3594dd.png",
	"aru-63": "https://7.dusays.com/2021/01/15/019e1b77e2a7a.png",
	"aru-64": "https://7.dusays.com/2021/01/15/c03b85b46fca0.png",
	"aru-65": "https://7.dusays.com/2021/01/15/72ebb18396c1f.png",
	"aru-66": "https://7.dusays.com/2021/01/15/d63be26611920.png",
	"aru-67": "https://7.dusays.com/2021/01/15/d5d5e96d20472.png",
	"aru-68": "https://7.dusays.com/2021/01/15/81fc986e0f758.png",
	"aru-69": "https://7.dusays.com/2021/01/15/e8af31913651a.png",
	"aru-7": "https://7.dusays.com/2021/01/15/e8a7806b92daf.png",
	"aru-70": "https://7.dusays.com/2021/01/15/6935bbe4d486d.png",
	"aru-71": "https://7.dusays.com/2021/01/15/88f8a46e6f3e8.png",
	"aru-72": "https://7.dusays.com/2021/01/15/945f5fd61483c.png",
	"aru-73": "https://7.dusays.com/2021/01/15/2bd2f71e51a7e.png",
	"aru-74": "https://7.dusays.com/2021/01/15/03942a2fc5786.png",
	"aru-75": "https://7.dusays.com/2021/01/15/1ae028cb237fc.png",
	"aru-76": "https://7.dusays.com/2021/01/15/772336d5d26bd.png",
	"aru-77": "https://7.dusays.com/2021/01/15/c453dcd756d9f.png",
	"aru-78": "https://7.dusays.com/2021/01/15/f74cfa9b2e2a8.png",
	"aru-79": "https://7.dusays.com/2021/01/15/a1d9fce9798da.png",
	"aru-8": "https://7.dusays.com/2021/01/15/c80a24a666629.png",
	"aru-80": "https://7.dusays.com/2021/01/15/ef102f1a9ab97.png",
	"aru-81": "https://7.dusays.com/2021/01/15/e5ba7820d1389.png",
	"aru-82": "https://7.dusays.com/2021/01/15/d3f1dde1b5f4e.png",
	"aru-83": "https://7.dusays.com/2021/01/15/4a8317cd8e4ed.png",
	"aru-84": "https://7.dusays.com/2021/01/15/40f07712dc899.png",
	"aru-85": "https://7.dusays.com/2021/01/15/fcf12e0ed5396.png",
	"aru-86": "https://7.dusays.com/2021/01/15/10ce961dfe4dc.png",
	"aru-87": "https://7.dusays.com/2021/01/15/5c81fd00a1970.png",
	"aru-88": "https://7.dusays.com/2021/01/15/ebdd63562fac9.png",
	"aru-89": "https://7.dusays.com/2021/01/15/e108658784bc6.png",
	"aru-9": "https://7.dusays.com/2021/01/15/df1a8b312ac98.png",
	"aru-90": "https://7.dusays.com/2021/01/15/5ce37370f6dbc.png",
	"aru-91": "https://7.dusays.com/2021/01/15/55ac01e87ce9d.png",
	"aru-92": "https://7.dusays.com/2021/01/15/cc8fb1287cedf.png",
	"aru-93": "https://7.dusays.com/2021/01/15/fa89012fda402.png",
	"aru-94": "https://7.dusays.com/2021/01/15/c2f18e9171adb.png",
	"aru-95": "https://7.dusays.com/2021/01/15/546f77a88657e.png",
	"aru-96": "https://7.dusays.com/2021/01/15/59fd4ca56f45a.png",
	"aru-97": "https://7.dusays.com/2021/01/15/1019c96cdac08.png",
	"aru-98": "https://7.dusays.com/2021/01/15/73aa39c2031fe.png",
	"aru-99": "https://7.dusays.com/2021/01/15/a5cf180e2f22a.png"
    };
  function pjax_valine() {
    if(!document.querySelectorAll("#valine_container")[0])return;
    let pagePlaceholder = pdata.commentPlaceholder || "快来评论吧~";
    let path = pdata.commentPath;
    if (path.length == 0) {
      let defaultPath = '';
      path = defaultPath || decodeURI(window.location.pathname);
    }
    var valine = new Valine();
    var friends = ''.split(',');
    var master = '81eec2291ca1eca7fb03db86845f7c50'.split(',');
    valine.init(Object.assign({"js":"https://cdn.jsdelivr.net/gh/HCLonely/Valine@latest/dist/Valine.min.js","path":null,"placeholder":"快来评论吧~","appId":"xf61G2HkgTKQ9qA5f4jakT3f-gzGzoHsz","appKey":"1zibslBkdxKCkRocxSx9xC0a","meta":["nick","mail","link"],"requiredFields":["nick","mail"],"enableQQ":true,"avatar":"robohash","pageSize":10,"lang":"zh-cn","highlight":true,"visitor":true,"mathJax":false,"metaPlaceholder":[{"nick":"Xu"},{"mail":"281658285@qq.com"}],"tagMeta":["博主","小伙伴","访客"],"master":["81eec2291ca1eca7fb03db86845f7c50"],"friends":null}, {
      el: '#valine_container',
      path: path,
      placeholder: pagePlaceholder,
      emotionUrl: ['https://valinecdn.bili33.top/qq','https://valinecdn.bili33.top/alu','https://valinecdn.bili33.top/weibo',],
      //emojiCDN: 'https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/emoji/valine/',
      //emojiCDN: '//i0.hdslb.com/bfs/emote/',
      emojiMaps: emojiMaps,
      master: master,
      friends: friends,
    }))
  }
  $(function () {
    pjax_valine();
  });
  volantis.pjax.push(pjax_valine);
</script>






  
<script src="/xu-blog/js/app.js"></script>



<!-- optional -->

  <script>
const SearchServiceimagePath="https://cdn.jsdelivr.net/gh/volantis-x/cdn-volantis@master/img/";
const ROOT =  ("/xu-blog/" || "/").endsWith('/') ? ("/xu-blog/" || "/") : ("/xu-blog//" || "/" );

$('.input.u-search-input').one('focus',function(){
	
		loadScript('/xu-blog/js/search/hexo.js',setSearchService);
	
})

function listenSearch(){
  
    customSearch = new HexoSearch({
      imagePath: SearchServiceimagePath
    });
  
}
function setSearchService() {
	listenSearch();
	
		document.addEventListener("pjax:success", listenSearch);
	
}
</script>











  <script defer>

  const LCCounter = {
    app_id: 'u9j57bwJod4EDmXWdxrwuqQT-MdYXbMMI',
    app_key: 'jfHtEKVE24j0IVCGHbvuFClp',
    custom_api_server: '',

    // 查询存储的记录
    getRecord(Counter, url, title) {
      return new Promise(function (resolve, reject) {
        Counter('get', '/classes/Counter?where=' + encodeURIComponent(JSON.stringify({url})))
          .then(resp => resp.json())
          .then(({results, code, error}) => {
            if (code === 401) {
              throw error;
            }
            if (results && results.length > 0) {
              var record = results[0];
              resolve(record);
            } else {
              Counter('post', '/classes/Counter', {url, title: title, times: 0})
                .then(resp => resp.json())
                .then((record, error) => {
                  if (error) {
                    throw error;
                  }
                  resolve(record);
                }).catch(error => {
                console.error('Failed to create', error);
                reject(error);
              });
            }
          }).catch((error) => {
          console.error('LeanCloud Counter Error:', error);
          reject(error);
        });
      })
    },

    // 发起自增请求
    increment(Counter, incrArr) {
      return new Promise(function (resolve, reject) {
        Counter('post', '/batch', {
          "requests": incrArr
        }).then((res) => {
          res = res.json();
          if (res.error) {
            throw res.error;
          }
          resolve(res);
        }).catch((error) => {
          console.error('Failed to save visitor count', error);
          reject(error);
        });
      });
    },

    // 构建自增请求体
    buildIncrement(objectId) {
      return {
        "method": "PUT",
        "path": `/1.1/classes/Counter/${ objectId }`,
        "body": {
          "times": {
            '__op': 'Increment',
            'amount': 1
          }
        }
      }
    },

    // 校验是否为有效的 UV
    validUV() {
      var key = 'LeanCloudUVTimestamp';
      var flag = localStorage.getItem(key);
      if (flag) {
        // 距离标记小于 24 小时则不计为 UV
        if (new Date().getTime() - parseInt(flag) <= 86400000) {
          return false;
        }
      }
      localStorage.setItem(key, new Date().getTime().toString());
      return true;
    },

    addCount(Counter) {
      var enableIncr = '' === 'true' && window.location.hostname !== 'localhost';
      enableIncr = true;
      var getterArr = [];
      var incrArr = [];
      // 请求 PV 并自增
      var pvCtn = document.querySelector('#lc-sv');
      if (pvCtn || enableIncr) {
        var pvGetter = this.getRecord(Counter, 'http://xxxxxwj.gitee.io/xu-blog' + '/#lc-sv', 'Visits').then((record) => {
          incrArr.push(this.buildIncrement(record.objectId))
          var eles = document.querySelectorAll('#lc-sv #number');
          if (eles.length > 0) {
            eles.forEach((el,index,array)=>{
              el.innerText = record.times + 1;
              if (pvCtn) {
                pvCtn.style.display = 'inline';
              }
            })
          }
        });
        getterArr.push(pvGetter);
      }

      // 请求 UV 并自增
      var uvCtn = document.querySelector('#lc-uv');
      if (uvCtn || enableIncr) {
        var uvGetter = this.getRecord(Counter, 'http://xxxxxwj.gitee.io/xu-blog' + '/#lc-uv', 'Visitors').then((record) => {
          var vuv = this.validUV();
          vuv && incrArr.push(this.buildIncrement(record.objectId))
          var eles = document.querySelectorAll('#lc-uv #number');
          if (eles.length > 0) {
            eles.forEach((el,index,array)=>{
              el.innerText = record.times + (vuv ? 1 : 0);
              if (uvCtn) {
                uvCtn.style.display = 'inline';
              }
            })
          }
        });
        getterArr.push(uvGetter);
      }

      // 请求文章的浏览数，如果是当前页面就自增
      var allPV = document.querySelectorAll('#lc-pv');
      if (allPV.length > 0 || enableIncr) {
        for (i = 0; i < allPV.length; i++) {
          let pv = allPV[i];
          let title = pv.getAttribute('data-title');
          var url = 'http://xxxxxwj.gitee.io/xu-blog' + pv.getAttribute('data-path');
          if (url) {
            var viewGetter = this.getRecord(Counter, url, title).then((record) => {
              // 是当前页面就自增
              let curPath = window.location.pathname;
              if (curPath.includes('index.html')) {
                curPath = curPath.substring(0, curPath.lastIndexOf('index.html'));
              }
              if (pv.getAttribute('data-path') == curPath) {
                incrArr.push(this.buildIncrement(record.objectId));
              }
              if (pv) {
                var ele = pv.querySelector('#lc-pv #number');
                if (ele) {
                  if (pv.getAttribute('data-path') == curPath) {
                    ele.innerText = (record.times || 0) + 1;
                  } else {
                    ele.innerText = record.times || 0;
                  }
                  pv.style.display = 'inline';
                }
              }
            });
            getterArr.push(viewGetter);
          }
        }
      }

      // 如果启动计数自增，批量发起自增请求
      if (enableIncr) {
        Promise.all(getterArr).then(() => {
          incrArr.length > 0 && this.increment(Counter, incrArr);
        })
      }

    },


    fetchData(api_server) {
      var Counter = (method, url, data) => {
        return fetch(`${ api_server }/1.1${ url }`, {
          method,
          headers: {
            'X-LC-Id': this.app_id,
            'X-LC-Key': this.app_key,
            'Content-Type': 'application/json',
          },
          body: JSON.stringify(data)
        });
      };
      this.addCount(Counter);
    },

    refreshCounter() {
      var api_server = this.app_id.slice(-9) !== '-MdYXbMMI' ? this.custom_api_server : `https://${ this.app_id.slice(0, 8).toLowerCase() }.api.lncldglobal.com`;
      if (api_server) {
        this.fetchData(api_server);
      } else {
        fetch('https://app-router.leancloud.cn/2/route?appId=' + this.app_id)
          .then(resp => resp.json())
          .then(({api_server}) => {
            this.fetchData('https://' + api_server);
          });
      }
    }

  };

  LCCounter.refreshCounter();

  document.addEventListener('pjax:complete', function () {
    LCCounter.refreshCounter();
  });
</script>




  <script>
const rootElement = document.documentElement;
const darkModeStorageKey = "user-color-scheme";
const rootElementDarkModeAttributeName = "data-user-color-scheme";

const setLS = (k, v) => {
    localStorage.setItem(k, v);
};

const removeLS = (k) => {
    localStorage.removeItem(k);
};

const getLS = (k) => {
    return localStorage.getItem(k);
};

const getModeFromCSSMediaQuery = () => {
  return window.matchMedia("(prefers-color-scheme: dark)").matches
    ? "dark"
    : "light";
};

const resetRootDarkModeAttributeAndLS = () => {
  rootElement.removeAttribute(rootElementDarkModeAttributeName);
  removeLS(darkModeStorageKey);
};

const validColorModeKeys = {
  dark: true,
  light: true,
};

const applyCustomDarkModeSettings = (mode) => {
  const currentSetting = mode || getLS(darkModeStorageKey);

  if (currentSetting === getModeFromCSSMediaQuery()) {
    resetRootDarkModeAttributeAndLS();
  } else if (validColorModeKeys[currentSetting]) {
    rootElement.setAttribute(rootElementDarkModeAttributeName, currentSetting);
  } else {
    resetRootDarkModeAttributeAndLS();
  }
};

const invertDarkModeObj = {
  dark: "light",
  light: "dark",
};

/**
 * get target mode
 */
const toggleCustomDarkMode = () => {
  let currentSetting = getLS(darkModeStorageKey);

  if (validColorModeKeys[currentSetting]) {
    currentSetting = invertDarkModeObj[currentSetting];
  } else if (currentSetting === null) {
    currentSetting = invertDarkModeObj[getModeFromCSSMediaQuery()];
  } else {
    return;
  }
  setLS(darkModeStorageKey, currentSetting);
  return currentSetting;
};

/**
 * bind click event for toggle button
 */
var btn=$("#wrapper .toggle-mode-btn,#rightmenu-wrapper .toggle-mode-btn");
function bindToggleButton() {
    btn.on('click',(e) => {
      const mode = toggleCustomDarkMode();
      applyCustomDarkModeSettings(mode);
    });
}

applyCustomDarkModeSettings();
document.addEventListener("DOMContentLoaded", bindToggleButton);
volantis.pjax.push(bindToggleButton);
volantis.pjax.send(()=>{
	btn.unbind('click');
},'toggle-mode-btn-unbind');
</script>








<script>
function listennSidebarTOC() {
  const navItems = document.querySelectorAll(".toc li");
  if (!navItems.length) return;
  const sections = [...navItems].map((element) => {
    const link = element.querySelector(".toc-link");
    const target = document.getElementById(
      decodeURI(link.getAttribute("href")).replace("#", "")
    );
    link.addEventListener("click", (event) => {
      event.preventDefault();
      window.scrollTo({
		top: target.offsetTop + 100,
		
		behavior: "smooth"
		
	  });
    });
    return target;
  });

  function activateNavByIndex(target) {
    if (target.classList.contains("active-current")) return;

    document.querySelectorAll(".toc .active").forEach((element) => {
      element.classList.remove("active", "active-current");
    });
    target.classList.add("active", "active-current");
    let parent = target.parentNode;
    while (!parent.matches(".toc")) {
      if (parent.matches("li")) parent.classList.add("active");
      parent = parent.parentNode;
    }
  }

  function findIndex(entries) {
    let index = 0;
    let entry = entries[index];
    if (entry.boundingClientRect.top > 0) {
      index = sections.indexOf(entry.target);
      return index === 0 ? 0 : index - 1;
    }
    for (; index < entries.length; index++) {
      if (entries[index].boundingClientRect.top <= 0) {
        entry = entries[index];
      } else {
        return sections.indexOf(entry.target);
      }
    }
    return sections.indexOf(entry.target);
  }

  function createIntersectionObserver(marginTop) {
    marginTop = Math.floor(marginTop + 10000);
    let intersectionObserver = new IntersectionObserver(
      (entries, observe) => {
        let scrollHeight = document.documentElement.scrollHeight + 100;
        if (scrollHeight > marginTop) {
          observe.disconnect();
          createIntersectionObserver(scrollHeight);
          return;
        }
        let index = findIndex(entries);
        activateNavByIndex(navItems[index]);
      },
      {
        rootMargin: marginTop + "px 0px -100% 0px",
        threshold: 0,
      }
    );
    sections.forEach((element) => {
      element && intersectionObserver.observe(element);
    });
  }
  createIntersectionObserver(document.documentElement.scrollHeight);
}

document.addEventListener("DOMContentLoaded", listennSidebarTOC);
document.addEventListener("pjax:success", listennSidebarTOC);
</script>

<!-- more -->

 
	   
	    


<script src="https://cdn.jsdelivr.net/npm/pjax@0.2.8/pjax.min.js"></script>


<script>
    var pjax;
    document.addEventListener('DOMContentLoaded', function () {
      pjax = new Pjax({
        elements: 'a[href]:not([href^="#"]):not([href="javascript:void(0)"]):not([pjax-fancybox])',
        selectors: [
          "title",
          
          "#pjax-container",
          "#pjax-header-nav-list"
        ],
        cacheBust: false,   // url 地址追加时间戳，用以避免浏览器缓存
        timeout: 5000
      });
    });

    document.addEventListener('pjax:send', function (e) {
      //window.stop(); // 相当于点击了浏览器的停止按钮

      try {
        var currentUrl = window.location.pathname;
        var targetUrl = e.triggerElement.href;
        var banUrl = [""];
        if (banUrl[0] != "") {
          banUrl.forEach(item => {
            if(currentUrl.indexOf(item) != -1 || targetUrl.indexOf(item) != -1) {
              window.location.href = targetUrl;
            }
          });
        }
      } catch (error) {}

      window.subData = null; // 移除标题（用于一二级导航栏切换处）

      volantis.$switcher.removeClass('active'); // 关闭移动端激活的搜索框
      volantis.$header.removeClass('z_search-open'); // 关闭移动端激活的搜索框
      volantis.$wrapper.removeClass('sub'); // 跳转页面时关闭二级导航

      // 解绑事件 避免重复监听
      volantis.$topBtn.unbind('click');
      $('.menu a').unbind('click');
      $(window).unbind('resize');
      $(window).unbind('scroll');
      $(document).unbind('scroll');
      $(document).unbind('click');
      $('body').unbind('click');
	  // 使用 volantis.pjax.send 方法传入pjax:send回调函数 参见layout/_partial/scripts/global.ejs
	  volantis.pjax.method.send.start();
    });

    document.addEventListener('pjax:complete', function () {
      $('.nav-main').find('.list-v').not('.menu-phone').removeAttr("style",""); // 移除小尾巴的移除
      $('.menu-phone.list-v').removeAttr("style",""); // 移除小尾巴的移除
      $('script[data-pjax], .pjax-reload script').each(function () {
        $(this).parent().append($(this).remove());
      });
      try{
		// 使用 volantis.pjax.push 方法传入重载函数 参见layout/_partial/scripts/global.ejs
		volantis.pjax.method.complete.start();
      } catch (e) {
        console.log(e);
      }
    });

    document.addEventListener('pjax:error', function (e) {
	  // 使用 volantis.pjax.error 方法传入pjax:error回调函数 参见layout/_partial/scripts/global.ejs
	  volantis.pjax.method.error.start();
      window.location.href = e.triggerElement.href;
    });
</script>
 
	  
    </div>
    

  </body>
</html>
